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.
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:
The job is queued to be executed at some point in the future.
The necessary row/table locks have been acquired, and the job is about to start.
The job is currently processing.
The job has finished.
The job can't acquire locks and so has to wait.
The job failed (opposite of COMPLETE) and must be retried.
The job has been suspended by the system to process other jobs.
The job has been suspended because of row locks, and will resume later.
The job has been aborted through some API command at the request of a user.
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
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.