Whenever a scheduled Apex Job is submitted, an entry is made in the CronTrigger table. What I see is, when this job is completed successfully, I see the State changed to "DELETED".

Based on the SOAP API Developer Guide:

The job state is managed by the system. Possible values are:

  • WAITING—The job is waiting for execution.
  • ACQUIRED—The job has been picked up by the system and is about to execute.
  • EXECUTING—The job is executing.
  • COMPLETE—The trigger has fired and is not scheduled to fire again.
  • ERROR—The trigger definition has an error.
  • DELETED—The job has been deleted.
  • PAUSED—A job can have this state during patch and major releases. After the release has finished, the job state is automatically set to WAITING or another state.
  • BLOCKED—Execution of a second instance of the job is attempted while one instance is running. This state lasts until the first job instance is completed.
  • PAUSED_BLOCKED—A job has this state due to a release occurring. When the release has finished and no other instance of the job is running, the job’s status is set to another state.

Why is the state changed to "DELETED" after successful execution of the job?

Also, If I abort this job (using system.abortjob method) the record gets removed from the Crontrigger table. Is this correct behavior?

1 Answer 1


Same issue observed. Scheduled job to run every day 1AM. Job processing successfully as I can see the expected results post job run. No exceptions observed in debug log. However Whenever a new jobs gets scheduled to run previous job marked as Aborted. Below are the links I have gone through for reference but not clear with this behaviour.

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_crontrigger.htm It is mentioned in the above link that, Job State is set to "COMPLETE" when trigger has fired and is not scheduled to fire again.

https://help.salesforce.com/articleView?id=000319687&type=1 In above knowladge article link it is mentioned "By design, scheduled Apex jobs will always stays in the "Queued" status until the job has no NextFireTime. It then gets marked Completed."


You must log in to answer this question.

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