Skip to content

Jobs Execution

To execute the job, execute the following command

polly jobs submit

On executing this command, you will be asked to enter the id of the workspace where the job should be run and the path to the job description JSON file. With this, the job will be submitted to run and Job ID will be created. This Job ID will be needed to check the status and the logs of the submitted job.

Note:

  • You do not need to create a new Workspace for running a job.
  • You can simply list the older Workspaces and run a job in an already created Workspace.

Submit Jobs

Figure 1. Submit Jobs

Alternatively, users can submit a job using interactive command prompt as shown below.

Submit Jobs

Figure 2. Submit Jobs

Monitor Job status

Get job status

  • The following command can be used to view the status of a particular job.
polly jobs status --workspace-id  --job-id 

Single Job Status

Figure 3. Single Job Status

  • The following command can be used to view the statuses of all the jobs in a workspace.
polly jobs status --workspace-id 

A prompt to enter job id will appear which when kept blank gets all the job statuses in a workspaces.

All Job Statuses in a Workspace

Figure 4. All Job Statuses in a Workspace

  • The following command can be used to view the status of a particular job. polly jobs status --workspace-id --job-id

View Job Status

Figure 5. View Job Status of a Particular Job

  • The following command can be used to view the statuses of all the jobs in a workspace. polly jobs status --workspace-id

View Job Status

Figure 6. View Job Status of All Jobs

  • Users can use enter ⏎ to fetch more jobs(in batch 20).

View Job Status

Figure 7. View Job Status of All Jobs

  • If you are within a Polly environment while accessing Polly CLI (like notebook or CLI job), workspace id can be auto-detected by passing --yes or -y in the command instead of --workspace-id parameter.

Alternatively, users can check jobs status using interactive commnd prompt.

All Job Statuses in a Workspace

Figure 8.Job Status in a Workspace

Get job logs

To view the logs of any job, use the following command:

polly jobs logs --workspace-id  --job-id 

This will give the logs for the job. In case the job is still running, it will give the logs generated till that instant.

Job Logs

Figure 9. Job Logs

Alternatively, users can log jobs status using interactive commnd prompt.

 Job log in a Workspace

Figure 10. Job logs

Note:

  • If you are within a Polly environment while accessing Polly CLI (like notebook or CLI job), workspace id can be auto-detected by passing --yes or -y in the command instead of --workspace-id parameter.
  • User can use any alphanumeric key to exit out of the interactive window.
  • Interactive window will exit automatically after displaying the jobs status, if remaining jobs are less then 20.

Polly CLI help

If help is needed for any command, just type --help at the end of the command and execute.

Polly CLI Help

Figure 13. Polly CLI Help

Some useful gists