task cancel

 

Applies To: Microsoft HPC Pack 2012, Microsoft HPC Pack 2012 R2

Cancels the specified task or subtask and all of the resource reservations associated with the task or subtask.

For examples of how to use this command, see Examples.

Syntax

task cancel <jobID>.<taskID>[.<subtaskID>] [/force] [/message:<message>]
[/scheduler:<name>]

task cancel {/? | /help}

Parameters

Parameter

Description

<jobID>.<taskID>[.<subtaskID>]

Specifies the task or subtask that you want to cancel. Only parametric tasks have subtasks. For a parametric task, you can cancel a subtask or the entire task.

/force

Stops the task immediately without using the grace period for task cancelation. Only tasks that respond when the user types CTRL+BREAK can use the grace period for task cancelation.

Note

This parameter was introduced inMicrosoft® HPC Pack 2008 R2 and is not supported in previous versions.

/message:<message>

Specifies a message to add to the log for the task to explain why you canceled the task. If the message contains spaces, enclose the message in double quotes (" ").

/scheduler:<name>

Specifies the host name or IP address of the head node for the cluster to which you submitted the task or subtask. The value must be a valid computer name or IP address. If you do not specify the /scheduler parameter, this command uses the scheduler on the head node that the CCP_SCHEDULER environment variable specifies.

/?

Displays Help at the command prompt.

/help

Displays Help at the command prompt.

Remarks

  1. Only an administrator or the owner of a task can cancel the task.

  2. When you cancel a task or subtask, the job scheduler removes the task or subtask from the queue if the task or subtask is waiting to run. If the task or subtask is running, the job scheduler stops the task or subtask and frees the resources that it was using for allocation to other tasks in the job. If no other task in the job that contains the task you are canceling requires resources, the job scheduler allocates the resources to other jobs.

Examples

To cancel the first task in the job with a job identifier of 45, use the following command:

task cancel 45.1

To cancel the fiftieth subtask or step of a parametric task that is the third task in the job with a job identifier of 67 and provide a message explaining why you canceled the subtask, use the following command:

task cancel 67.3.50 /message:"The fiftieth step is unnecessary."

To cancel the third task in the job with a job identifier of 94 immediately, without using the grace period for task cancelation, use the following command:

task cancel 94.3 /force

Additional references