As the job scheduler and grid endpoint process a grid batch job, the job state updates in the job scheduler database. The diagram shows the relationship between states, and the following table lists the possible batch job states and the events that trigger transitions between states. You can view the current state of a batch job from the job management console, or retrieve it using the command line or Enterprise JavaBeans (EJB) interface. If a failure occurs before a batch step initializes, then the batch job goes into execution failed state. Otherwise, it goes into restartable state.
Start State | Client Command | SystemAction | Special Condition | Numeric return codes | End State |
---|---|---|---|---|---|
non-existent (delayed submit) | submit | n/a | Not applicable | pending submit | |
non-existent | submit | n/a | Not applicable | submitted | |
submitted | n/a | dispatch | Not applicable | 0 | executing |
submitted | cancel | n/a | Not applicable | 0 | restartable |
executing | cancel | n/a | Not applicable | 4 | cancel_pending |
executing | n/a | caught application error* | Not applicable | 4 | restartable |
executing | n/a | n/a | Infrastructure problem** | 4 | restartable |
executing | suspend | n/a | Not applicable | 4 | suspend_pending |
executing | n/a | job completed | Not applicable | 4 | ended |
executing | n/a | n/a | Infrastructure problem in job setup*** | 4 | execution_failed |
suspend_pending | n/a | checkpoint | Not applicable | 2 | suspended |
suspend_pending | n/a | n/a | Infrastructure problem** | 2 | restartable |
suspended | resume | n/a | n/a | 5 | resume_pending |
suspended | cancel | n/a | n/a | 5 | cancel_pending |
suspended | Not applicable | n/a | Infrastructure problem** | 5 | restartable |
resume_pending | Not applicable | job resumed | Not applicable | 2 | executing |
resume_pending | Not applicable | Not applicable | Infrastructure problem** | 2 | restartable |
restartable | restart | Not applicable | Not applicable | 8 | submitted |
cancel_pending | Not applicable | job canceled | Not applicable | 1 | restartable |
cancel_pending | Not applicable | Not applicable | Infrastructure problem** | 1 | restartable |
restartable | purge | Not applicable | Not applicable | 8 | non-existent |
execution_failed | purge | Not applicable | Not applicable | 9 | non-existent |
ended | purge | Not applicable | Not applicable | 7 | non-existent |
* Application error |
The batch application failed at runtime. The Compute Grid endpoints detected this failure. |
** Infrastructure problem |
An unexpected error has occurred. See the following example for infrastructure problem in job setup. |
*** Infrastructure problem in job setup |
An unexpected error that occurs when a batch job is set up for the first time by the Compute Grid endpoints. For example, if there is an unexpected database failure, the job goes into execution_failed state. This is a condition where the batch job is run for the first time and no steps are processed yet. Batch jobs go into the restartable state under most failure conditions so that they can restart from checkpointed positions if the failure condition can be overcome. However, this is an instance of a failure condition where a batch job goes into execution_failed state and cannot be restarted. Since this is a job setup scenario and work is not yet processed by the batch job. Batch work is not lost as a result of failure. |