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 9. 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 10. 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 11. All Job Statuses in a Workspace

  • 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.

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 12. 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.

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