Hi All,
Below is the script to help you to delete all scheduler jobs at a time.
List<CronTrigger> scope = [select id from CronTrigger];
System.debug('Hi---'+scope );
for(CronTrigger cron:scope ){
System.abortJob(cron.id);
}
Thanks,
Asish
Below is the script to help you to delete all scheduler jobs at a time.
List<CronTrigger> scope = [select id from CronTrigger];
System.debug('Hi---'+scope );
for(CronTrigger cron:scope ){
System.abortJob(cron.id);
}
Thanks,
Asish
2 comments:
Anyways why do you need to delete those Jobs?
Lets take an example, when a sandbox is refreshed we need to stop all scheduling jobs so that we can mask all production email.
Post a Comment