Life Cycle of a JAMS Job

Follow

The life cycle of a JAMS Job is tracked by the JobState property. The following list describes what happens as a Job moves through each of the states.

Scheduled
The Job has just been added to the schedule and the JAMSSchedule service has not looked at it. The Job will be in this state for only a short period of time. When the JAMSSceduler service looks at the Job, it will advance the JobState to Held.

Held
If the Job has been Held until released, it will stay in the Held state until it is manually released. If the Job has not been held, it will advance to either Timed or StepWait state. If the Job is a subJob of a Setup, it advances to StepWait otherwise, it advances to timed.

Timed
The Job is waiting for its scheduled time to arrive and/or waiting for its Schedule Window to open. When the scheduled time arrives, the Job’s dependencies are evaluated and the JobState is advanced to DependencyWait

StepWait
The Job is waiting for its Setup to advance to the Job’s step. When the Setup does, the Job’s JobState is advanced to DependencyWait.

DependencyWait
The Job is waiting for all of its Dependencies to be satisfied. When they are satisfied, the JobState is advanced to PrecheckWait.

PrecheckWait
The Job’s Precheck Job is Submitted (if there is one). When the Job completes successfully, the JobState is advanced to ResourceWait. If the precheck Job is not successful, it is resubmitted after a delay. If the Job does not have a precheck Job, the JobState advances to ResourceWait.

ResourceWait
The Job is waiting for resources or a queue Job limit slot. When resources and queue slot are available, the JobState is advanced to Pending.

Pending
The Job is ready to run. Send the information the to the JAMS Executor service and advance the JobState to Starting

Starting
Waiting for the completion of the JAMSExecutor remote procedure call. When it completes, the JobState is advanced to Executing

Executing
The Job is Executing.

Idle
The Job is still logically Executing but, it is Idle while waiting for an event. There is no longer a process or executable associated with the Job, the Job’s process notified us before exiting that is was not done, it was just going idle while waiting for an event. This state is only used by Workflow Foundation Jobs.

Completed
The Job is done. All processes associated with the Job have completed. We leave the Job in the Completed state for 60 seconds before either deleting all traces of the Job or advancing the Job state to CompletedKept

CompletedKept
The Job is done but is being retained in the schedule for awhile. The amount of time to keep the Job in the schedule could be specified in the Job’s retain options, the Job’s system’s retain options or the KeepCompleted Configuration setting.

Rescheduling
The Rescheduling JobState is no longer used.

Missing
While a Job is executing the JAMSScheduler service will periodically ask the JAMSExecutor service to the status of the Job. If the JAMSExecuter doesn’t have the Job, the JAMSScheduler changes the JobState to missing. A Job in the Missing JobState will eventually be handled as a failed Job and the Job state will change to Completed.

Have more questions? Submit a request

Comments