+ Start a Discussion
Ram ChaturvediRam Chaturvedi 

DML operation DELETE not allowed on CronTrigger ?

String JobName = 'job8'+recId;
            CronTrigger cjd = [SELECT Id FROM CronTrigger where CronJobDetail.Name=:jobname];
                delete cjd;

how can we delete schedule job ?
You can not delete Cron trigger.

You can abort job by


Ankit AroraAnkit Arora
You've to abort the job like this :

Deepak Kumar ShyoranDeepak Kumar Shyoran
If you want to abort a Schedule job the use use below method and  pass job Id which you want to abort.