Submitting jobs with the Deadline Cloud CLI - AWS Deadline Cloud

Submitting jobs with the Deadline Cloud CLI

To submit a job using the Deadline Cloud command line interface (Deadline Cloud CLI), use the deadline bundle submit command.

Jobs are submitted to queues. If you haven't set up a farm and queue yet, use the Deadline Cloud console (https://console.aws.amazon.com/https://console.aws.amazon.com/deadlinecloud/home) to set up a farm and queue and to see the farm and queue ID. For more information, see Define farm details and Define queue details.

To set the default farm and queue for the Deadline Cloud CLI, use the following command. When you set the defaults, you can use Deadline Cloud CLI commands without specifying a farm or queue. In the following example, replace farmId and queueId with your own information:

deadline config set defaults.farm_id farmId deadline config set defaults.queue_id queueId

To specify the steps and tasks in a job, create an OpenJD job template. For more information, see Template Schemas [Version: 2023-09] in the Open Job Description specification GitHub repository.

The following example is a YAML job template. It defines a job with two steps and five tasks per step.

name: Sample Job specificationVersion: jobtemplate-2023-09 steps: - name: Sample Step 1 parameterSpace: taskParameterDefinitions: - name: var range: 1-5 type: INT script: actions: onRun: args: - '1' command: /usr/bin/sleep - name: Sample Step 2 parameterSpace: taskParameterDefinitions: - name: var range: 1-5 type: INT script: actions: onRun: args: - '1' command: /usr/bin/sleep

To create a job, create a new folder named sample_job, then save the template file in the new folder as template.yaml. You submit the job with the following Deadline Cloud CLI command:

deadline bundle submit path/to/sample_job

The response from the command contains an identifier for the job. Remember the ID so that you can check the job's status later.

Submitting to Queue: test-queue Waiting for Job to be created... Submitted job bundle: sample_job Job creation completed successfully jobId

There are additional options that you can use when submitting a job. For more information, see More options for submitting jobs with the Deadline Cloud CLI.