function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
GreenhornGreenhorn 

Error in execution of cron job: Failed to process batch for class 'Job2'

Hi,

We have following scenario for the chained batch jobs in our app.
In the finish of first batch job, next job is scheduled with the help of cron expression. we are adding 2 seconds to current time as
buffer as the SF may take time to schedule the job.

job1.finish(){

     job2.schedule(current time + 2 seconds);

}

Actual execution may be delayed based on service availability.

sometimes we are gtting error  : Failed to process batch for class 'analysis2_TEST' for job id '707E0000003JRVw'
caused by: System.AsyncException?: Based on configured schedule, the given trigger will never fire.

What should the ideal time dealy we need to add so that we are sure that the job will be alwayed fired.


Thanks