'Apex CPU time limit exceeded' - Failed to process Queueable job for class rio_ed.BK_DoubleBooking_QUEUE
Table of Contents
Description
I have received an error as follows:
Failed to process Queueable job for class rio_ed.BK_DoubleBooking_QUEUE
Caused by: System.LimitException: Apex CPU time limit exceeded
What could be the reason behind this?
Resolution
If you are performing updates on Session, Session Time, and Allocation, then, the double booking job (BK_DoubleBooking_QUEUE) is triggered if the updated Allocations meet one of the following criteria:
- rio_ed__Start__c is changed
- rio_ed__End__c is changed
- rio_ed__Resource__c is changed
- rio_ed__Status__c is changed
- rio_ed__Status__c equals to “=== WARNING MID UPDATE ===”
- rio_ed__Status__c equals to "Revalidated"
If you need to update the Allocation records, it is recommended to:
- Use a smaller batch size in the data loader tool.
- Sort the records by Plan Line, Resource and start in order for the double booking job to process the records better.