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:


  1. Navigate to Setup and search for Apex Classes in the Quick Find box at the left hand side of the screen

  2. On Apex Classes page click the ‘Schedule Apex’ button to create a new Apex job

  3. A screen will be displayed enabling you to establish the run criteria

  4. Enter a Job Name ‘Asperato Repeat Payment’ (recommended value)

  5. Next to the Apex Class box press the magnifying glass icon and in the list that displays select ‘BatchProcessPaymentSchedules’

  6. In the'Schedule Apex Execution' section set the Frequency to ‘Weekly’ and tick all the boxes under 'Recurs every week on'

  7. Select a Start date (defaults to today)

  8. 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

  9. Set the Preferred Start Time to a value, a suggestion would be 04:00 or 05:00

  10. Save this record and that will schedule the task