Created
May 4, 2017 10:33
-
-
Save ravi72munde/8c1447c1f25855537e30adfb8a5d5591 to your computer and use it in GitHub Desktop.
Remove all scheduled jobs/CronTrigger tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List < CronTrigger > listCronTrigger = [select Id from CronTrigger LIMIT 150]; | |
If(listCronTrigger.size() > 0) { | |
For(Integer i = 0; i < listCronTrigger.size(); i++) { | |
System.abortJob(listCronTrigger[i].Id); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment