Job states in the Deadline Cloud CLI - AWS Deadline Cloud

Job states in the Deadline Cloud CLI

This topic describes how to use the AWS Deadline Cloud command line interface (Deadline Cloud CLI) to view the status of a job or step. To use the Deadline Cloud monitor to view the status of jobs or steps, see View and manage jobs, steps, and tasks in Deadline Cloud.

You can see the status of a job using the deadline job get --job-id Deadline Cloud CLI command. The response to the commands include the status of the job or step and the number of tasks in each processing status.

When you first submit a job, the status is CREATE_IN_PROGRESS. If the job passes the validation checks, its status changes to CREATE_COMPLETE. If not, the status changes to CREATE_FAILED.

Some possible reasons that a job can fail validation checks include the following:

  • The job template doesn't follow the OpenJD specification.

  • The job contains too many steps.

  • The job contains too many total tasks.

To see the quotas for the maximum number of steps and tasks in a job, use the Service Quotas console. For more information, see Quotas for Deadline Cloud.

There may also be an internal service error that prevents a job from being created. If this happens, the job's status code is INTERNAL_ERROR and the status message field provides a more detailed explanation.

Use the following Deadline Cloud CLI command to view the details for a job. In the following example, replace jobID with your own information:

deadline job get --job-id jobId

The response from the deadline job get command is as follows:

jobId: jobId name: Sample Job lifecycleStatus: CREATE_COMPLETE lifecycleStatusMessage: Job creation completed successfully priority: 50 createdAt: 2024-03-26 18:11:19.065000+00:00 createdBy: Test User startedAt: 2024-03-26 18:12:50.710000+00:00 taskRunStatus: STARTING taskRunStatusCounts: PENDING: 0 READY: 5 RUNNING: 0 ASSIGNED: 0 STARTING: 0 SCHEDULED: 0 INTERRUPTING: 0 SUSPENDED: 0 CANCELED: 0 FAILED: 0 SUCCEEDED: 0 NOT_COMPATIBLE: 0 maxFailedTasksCount: 100 maxRetriesPerTask: 5

Each task in a job or step has a status. The task statuses are combined to give an overall status for jobs and steps. The number of tasks in each state is reported in the taskRunStatusCounts field of the response.

The status of a job or step depends on the status of its tasks. The status is determined by tasks that have these statuses, in order. Step statuses are determined the same as the job status.

The following list describes the statuses:

NOT_COMPATIBLE

The job is not compatible with the farm because there are no fleets that can complete one of the tasks in the job.

RUNNING

One or more workers are running tasks from the job. As long as there is at least one running task, the job is marked RUNNING.

ASSIGNED

One or more workers are assigned tasks in the job as their next action. The environment, if any, is set up.

STARTING

One or more workers is setting up the environment for running tasks.

SCHEDULED

Tasks for the job are scheduled on one or more workers as the worker's next action.

READY

At least one task for the job is ready to be processed.

INTERRUPTING

At least one task in the job is being interrupted. Interruptions can happen when you manually update the job's status. It can also happen in response to an interruption due to Amazon Elastic Compute Cloud (Amazon EC2) Spot price changes.

FAILED

One or more tasks in the job didn't complete successfully.

CANCELED

One or more tasks in the job have been canceled.

SUSPENDED

At least one task in the job has been suspended.

PENDING

A task in the job is waiting on the availability of another resource.

SUCCEEDED

All tasks in the job were successfully processed.