delete_job

Deletes a job or a set of jobs matching the filter criteria. A job cannot be deleted if any of its executions are active. All executions must be in one of the following states:

ABORTED, FAILED, COMPLETED, STOPPED, SKIPPED

Use the get_jobs verb to obtain a list of existing jobs along with their job IDs and statuses.

Format

emcli delete_job
      [-job_id="ID1;ID2;..."]
      [-name="job name pattern"]
      [-owner="job owner"]
      [-type="job type"]
      [-targets="target name:target type"]
      [-input_file=property_file:"filename"]
      [-preview]

[ ]  indicates that the parameter is optional

Options

  • job_id

    Semi-colon ( ; ) separated list of job(s) to delete.

    NOTE: This filter cannot be used with other filters.

  • name

    Name or pattern of the job to delete. To uniquely identify the job, the current user is used.

  • owner

    Owner of the job(s).

  • type

    Job type of the job(s).

  • targets

    Target name and target type of the job(s) to be deleted.

  • input_file

    The properties for filtering jobs can be specified in "filename". Any jobs matching all the specified filter criteria are deleted. You must specify at least one filter, and the logged in administrator must have the necessary privileges on the matching jobs.

    For more information about the input_file parameter, see -input_file Syntax Guidelines.

  • preview

    Lists only the jobs to be deleted. In the list of options you specify, if -preview is not one of the options, jobs are deleted, and then these jobs will be listed. If -preview is one of the options, the identical list is shown, but no jobs are deleted.

Examples

Example 1

This example deletes an existing job with the job ID 12345678901234567890123456789012.

emcli delete_job -job_id=12345678901234567890123456789012

Example 2

This example stops and deletes a job named MY_JOB owned by the logged in administrator. You can use the stop and delete pattern to delete active jobs.

emcli stop_job -name=my_job
emcli delete_job -name=my_job