5

We had scheduled batch jobs through developer console

System.schedule('Job1', '0 * * * * ?', new scheduledMerge());
System.schedule('Job2', '0 15 * * * ?', new scheduledMerge());
System.schedule('Job3', '0 30 * * * ?', new scheduledMerge());
System.schedule('Job4', '0 45 * * * ?', new scheduledMerge());

Now i want to stop these jobs from running every 15 mins. How can i stop these jobs? If i delete the jobs from Monitoring -> scheduled Jobs.

1 Answer 1

13

Try this Apex code in Developer Console Execute Anonymous.

for (CronTrigger ct : [SELECT Id FROM CronTrigger]) {
    System.abortJob(ct.Id);
}
2
  • 4
    They may have schedulled jobs they do not wish to stop, did you consider that ? Commented Jan 30, 2014 at 15:08
  • 4
    I think that if they have some they will be able add some conditions to this query :) In fact question was "How do we stop all scheduled batch" Commented Jan 30, 2014 at 15:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .