You need to sign in to do that
Don't have an account?
David Hien 8
how to delete the above Schedule Jobs with for loop
How to delete the Schedule Jobs with for loop.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
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