5

Who know the meanings of state of CronTrigger object? I wanna know the detail of those state and it is the best if answer from official documents. Thank you all.

3 Answers 3

5

The documentation isn't clear, as far as I can tell, but I'll start an answer and see if anyone can fill in the blanks:

WAITING

The job is queued to be executed at some point in the future.

ACQUIRED

The necessary row/table locks have been acquired, and the job is about to start.

EXECUTING

The job is currently processing.

COMPLETE

The job has finished.

BLOCKED

The job can't acquire locks and so has to wait.

ERROR

The job failed (opposite of COMPLETE) and must be retried.

PAUSED

The job has been suspended by the system to process other jobs.

PAUSED_BLOCKED

The job has been suspended because of row locks, and will resume later.

DELETED

The job has been aborted through some API command at the request of a user.

1
  • I referred to the documentation here - developer.salesforce.com/docs/atlas.en-us.api.meta/api/… , here the explanation for the "Complete" state is : The trigger has fired and is not scheduled to fire again. I can not understand the match between the explanation you provided for this status and the one that is given in documentation. Please explain ! @sfdcfoc Aug 5, 2015 at 7:29
1

The Status column lists the current status of the job. The possible values are:

Holding - Job has been submitted and is held until system resources are freed up.

Queued - Job is awaiting execution.

Preparing - The start method of the job has been invoked. This status might last a few minutes depending on the size of the batch of records.

Processing - Job is being processed. Aborted Job was aborted by a user.

Completed - Job completed with or without failures.

Failed - Job experienced a system failure.

find more in the documentation

1
  • Hi Pavel, thank you for answer. Perhaps you confuse the object name form my question. Your answer refered to the AsyncApexJob object, I refered to the CronTrigger object. :) and thanks again.
    – Leisure
    Sep 15, 2014 at 8:43
0

As per salesforce documentation, below are the meanings for them:

  • 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.

You must log in to answer this question.

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