Please use this I hope you understand. (1) List<CronTrigger> abort_job = [SELECT Id FROM CronTrigger ]; for (CronTrigger ct : abort_job) { System.abortJob(ct.Id); }
(2) you can also use this.
for(integer i=0;i<=55;i=i+5){ String CRON_EXP = '0'+i+' * ?' ; CountbatchSchedule bt2= new CountbatchSchedule(); Id jobId=System.schedule('updateAccountCount'+i,CRON_EXP,bt2); System.abortJob(jobId); }
Please mark it as best Answer if you find it helpful.
Please use this I hope you understand. (1) List<CronTrigger> abort_job = [SELECT Id FROM CronTrigger ]; for (CronTrigger ct : abort_job) { System.abortJob(ct.Id); }
(2) you can also use this.
for(integer i=0;i<=55;i=i+5){ String CRON_EXP = '0'+i+' * ?' ; CountbatchSchedule bt2= new CountbatchSchedule(); Id jobId=System.schedule('updateAccountCount'+i,CRON_EXP,bt2); System.abortJob(jobId); }
Please mark it as best Answer if you find it helpful.
Please use this I hope you understand.
(1)
List<CronTrigger> abort_job = [SELECT Id FROM CronTrigger ];
for (CronTrigger ct : abort_job) {
System.abortJob(ct.Id);
}
(2)
you can also use this.
for(integer i=0;i<=55;i=i+5){
String CRON_EXP = '0'+i+' * ?' ;
CountbatchSchedule bt2= new CountbatchSchedule();
Id jobId=System.schedule('updateAccountCount'+i,CRON_EXP,bt2);
System.abortJob(jobId);
}
Please mark it as best Answer if you find it helpful.
Thank You
Ajay Dubedi
All Answers
Please use this I hope you understand.
(1)
List<CronTrigger> abort_job = [SELECT Id FROM CronTrigger ];
for (CronTrigger ct : abort_job) {
System.abortJob(ct.Id);
}
(2)
you can also use this.
for(integer i=0;i<=55;i=i+5){
String CRON_EXP = '0'+i+' * ?' ;
CountbatchSchedule bt2= new CountbatchSchedule();
Id jobId=System.schedule('updateAccountCount'+i,CRON_EXP,bt2);
System.abortJob(jobId);
}
Please mark it as best Answer if you find it helpful.
Thank You
Ajay Dubedi