ISchedulerJob.CancelTask Method (ITaskId)

Cancels the specified task.


Namespace: Microsoft.Hpc.Scheduler
Assembly: Microsoft.Hpc.Scheduler (in Microsoft.Hpc.Scheduler.dll)

'Usage
Dim instance As ISchedulerJob
Dim taskId As ITaskId

instance.CancelTask(taskId)

void CancelTask (
	ITaskId taskId
)
void CancelTask (
	ITaskId taskId
)
function CancelTask (
	taskId : ITaskId
)

Parameters

taskId

A ITaskId object that identifies the task to cancel.

To cancel a task, the state of the task must be Configuring, Submitted, Queued, or Running. If a task is running when it is canceled, the task ends and the state of the task changes to Failed. If you cancel a task with a task of Configuring or Queued, the state of the task changes to Canceled.

If you cancel a parametric task, the state of the parametric master task always changes to Canceled, and all of the individual subtasks are canceled. If the subtask is running when you cancel the parametric task, the state of the subtask changes to Failed. If the subtask is in a state other than Running, the state of the subtask changes to Canceled.

To determine the state of a task, use the ISchedulerTask.State property.

You can call the RequeueTask method to queue the task again.

The CancelTask(ITaskId) method honors the grace period for the cancellation of the task.

To cancel a task and provide a message to the user that explains the reason you canceled the task in Windows HPC Server 2008 R2, use the CancelTask(ITaskId,String) or CancelTask(ITaskId,String,Boolean) method. To cancel a task immediately without using the grace period for canceling a task in Windows HPC Server 2008 R2, use the CancelTask(ITaskId,String,Boolean) method.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012

Target Platforms

Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, with HPC Pack Client Utilities




Build Date:

2013-04-22
Show: