0

One of my team members has mistakenly aborted all the scheduled batch jobs from the system using the below code -

List<CronTrigger> jobsToAbort = [select Id from CronTrigger where 
                                         CronJobDetail.JobType = '7'];
for (CronTrigger job : jobsToAbort) { System.abortJob(job.Id); }

is there any way to find out the previous schedule for the aborted batch jobs?

2
  • Did you try querying the CronExpression field on CronTrigger? You should be able to use that to schedule them again. developer.salesforce.com/docs/atlas.en-us.api.meta/api/… Nov 4, 2019 at 13:47
  • I cannot find any record querying the below SOQL: SELECT CreatedById,CreatedDate,CronExpression,CronJobDetailId,CronJobDetail.Name,EndTime,Id,LastModifiedById,NextFireTime,OwnerId,PreviousFireTime,StartTime,State,TimesTriggered,TimeZoneSidKey FROM CronTrigger where CronJobDetail.JobType = '7' Nov 4, 2019 at 14:02

0

You must log in to answer this question.

Browse other questions tagged .