In some orgs the daily 'Asperato Repeat Payment' job will fail with the message
"Access to entity 'AggregateResult' denied: Entity is not api accessible"
The work around is to delete the scheduled job and recreate it using a user account that has a 'system administrator' profile.
To remove the scheduled task go to Setup and search for 'Scheduled Jobs'. In the list there will be a job called 'Asperato Repeat Payment' and you should make a note of the start time and then delete the job.
You can then recreate it using these instructions:
- Navigate to Setup > Build > Develop > Apex Classes and press ‘Schedule Apex’ button
- A screen will be displayed enabling you to establish the run criteria
- Enter a Job Name ‘Asperato Repeat Payment’ (recommended value)
- Next to the Apex Class box press the magnifying glass icon and in the list that displays select ‘BatchProcessPaymentSchedules’
- In the'Schedule Apex Execution' section set the Frequency to ‘Weekly’ and tick all the boxes under 'Recurs every week on'
- Select a Start date (defaults to today)
- Set an End date. The default is in one month and you should change this to a value a long time in the future such as 31/12/2050
- Set the Preferred Start Time to a value, a suggestion would be 04:00 or 05:00
- Save this record and that will schedule the task