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


2 Answers 2


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){


list<CronTrigger> Cts = [select id from CronTrigger where CronJobDetailId IN :ids];
for(cronTrigger ct: Cts){
  • this will abort every job
    – cropredy
    Commented Mar 28, 2016 at 4:12

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

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .