1

How can I modify a batch class that is already placed in a schedule. I have deleted the Scheduled job and still getting error to modify the corresponding batch class. Can someone please help me here?

Compile error: This Apex class has batch or future jobs pending or in progress; This schedulable class has jobs pending or in progress

1

Please try this code on your developer console.

list<string> ids = new list<string>();
list<CronJobDetail> cjds = [select id from CronJobDetail];

for(CronJobDetail cjd : cjds){

    ids.add(cjd.id);

}
list<CronTrigger> Cts = [select id from CronTrigger where CronJobDetailId IN :ids];
for(cronTrigger ct: Cts){
    system.abortJob(Ct.id);
} 
  • this will abort every job – cropredy Mar 28 '16 at 4:12
1

Please remove scheduled batch job manually if you are trying to modified it, then you can continue to modify it.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.