jjob

controls a job in a running flow.

Synopsis

jjob [-u user_name] -i flow_id -c|-k|-r|-p|-g|-l [-a] "flow_name[:subflow_name]:job_name"

jjob [-h]|[-V]

Description

You use the jjob command to kill or run a job, or mark a job complete. You must be the owner of the job or a Process Manager administrator or control administrator to control it.

Options

-u user_name

Specifies the name of the user who owns the job you are controlling. If you do not specify a user name, user name defaults to the user who invoked this command.

-i flow_id

Specifies the ID of the flow containing the job to be controlled. This option is required to differentiate between multiple occurrences of the flow, ensuring the correct job is selected.

-c

Specifies to mark the job complete. You can only complete a job in a flow that has exited. you use this option before rerunning a flow, to continue processing the remainder of the flow.

-k

Specifies to kill the job.

-r

Specifies to run or rerun the job.

-p

Specifies to put the job on hold. Only jobs in the Waiting state can be put on hold. You can put on hold LSF jobs, job submission scripts, local jobs, and job arrays.

If the selected job is in a flow array, by default the hold applies to the job in the element the job is in. You can, alternatively, apply the hold to jobs in all elements in the flow array.

When you put a job in the flow on hold, the flow pauses at that specific job. Only the branch of the flow that contains the job that is On Hold pauses. Other branches of the flow continue to run. The status of the flow is not affected.

When desired, you can then release the job that you have put on hold.

-g

Specifies to release a job that has been put on hold. You can release LSF® jobs, job submission scripts, local jobs, and job arrays that have been put on hold.

When you release a job that has been put on hold, the flow instance continues to run and the job receives the status Waiting.

-l

Specifies to view the detailed history of local and input variables that the job uses. This does not show global variables.

-a

Specifies that the job to control is a job array.

flow_name:subflow_name:job_name

Specifies the name of the job to control. Specify the fully-qualified job name, which is the flow name followed by the subflow name, if applicable, followed by the name of the job. For example:

myflow:print:prtreport
Note:

When specifying the job name for a flow array, you must enclose the name in quotation marks ("). This is because the Linux® command line does not process parentheses characters (( or )) properly unless you use quotation marks.

For example:

"myflow:print(5):prtreport"
-h

Prints the command usage to stderr and exits.

-V

Prints the Process Manager release version to stderr and exits.

Examples

Kill a specific flow

jjob -i 42 -k payprt:report

kill the job report in the flow payprt with flow ID 42.

Hold and release a job

  • Hold a job

    jjob -i 42 -p "myflow:myjob"
    

    In flow with ID 42, flow name myflow, put the job named myjob on hold. The job receives the status On Hold and the flow stops running when it reaches that specific job.

  • Release the job

    jjob -i 42 -g "myflow:myjob"
    

    In flow with ID 42, flow name myflow, release the job named myjob. The flow will resume running from that point onward in the flow.

Hold and release a job array

  • Hold a job array

    jjob -i 42 -p -a "myflow:myarray"

    In flow with ID 42, flow name myflow, put the job array named myarray on hold. The job array receives the status On Hold and the flow stops running when it reaches that specific job array.

  • Release the job array

    jjob -i 42 -g -a "myflow:myarray"
    

    In flow with ID 42, flow name myflow, release the job array named myarray. The flow will resume running from that point onward in the flow.

Hold and release a job in a flow array

  • Hold a job in a flow array

    jjob -i 45 -p "mymainflow:myflowarray(1):myjob"

    In flow with ID 45, flow name mymainflow, flow array myflowarray hold the job named myjob in the first element only. The job receives the status On Hold and the subflow stops running when it reaches that specific job in the flow array.

  • Release the job in the flow array

    jjob -i 45 -g "mymainflow:myflowarray(1):myjob"

    In flow with ID 45, flow name mymainflow, flow array named myflowarray, release the job named myjob in the first element only. The job receives the status Waiting and the subflow will continue running once it reaches that job in the flow.

  • Hold all jobs in all elements in the flow array

    jjob -i 45 -p "mymainflow:myflowarray:myjob"

  • Release all jobs in all elements in the flow array

    jjob -i 45 -g "mymainflow:myflowarray:myjob"

See Also

jmanuals