Is there any way to unschedule an apex scheduled job programmatically?

Is there any way, either using apex or the API to unschedule a scheduled job?

Answer

System.abortJob(Id) can do this. Simply pass in the Id of the CronTrigger for the job in question.

You’ll note the docs specifically mention System.schedule results can be passed in, which would represent the scheduled job id; this same value can be obtained from the CronTrigger table.

Attribution
Source : Link , Question Author : greenstork , Answer Author : ca_peterson

Leave a Comment