Cluster.CancelTask Method
Cancels the specified task.
Namespace: Microsoft.ComputeCluster
Assembly: CcpAPI (in ccpapi.dll)
Usage
Syntax
'Declaration
Public Sub CancelTask ( _
jobId As Integer, _
taskId As Integer, _
message As String _
)
public void CancelTask (
int jobId,
int taskId,
string message
)
public:
virtual void CancelTask (
int jobId,
int taskId,
String^ message
) sealed
public final void CancelTask (
int jobId,
int taskId,
String message
)
public final function CancelTask (
jobId : int,
taskId : int,
message : String
)
Parameters
- jobId
The job identifier. The Cluster.AddJob method returns this value. If you have a job object that has already been added to the cluster, you can access the Job.Id property to get the identifier.
- taskId
The task identifier. To get this value, access the Task.Id property.
message
A message that describes the reason why the task was canceled. The message is limited to 320 Unicode characters. This parameter can be NULL.The message is stored with the task. To get the message, access the Task.ErrorMessage property.
Remarks
To cancel a task, the task's status must be: not submitted, queued, or running. If a task is running when it is canceled, the task is terminated and the status of the task changes to Cancelled (see TaskStatus). To determine a task's status, access the Task.Status property.
You can call the Cluster.RequeueTask method to queue the task again.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Microsoft Windows Compute Cluster Server 2003, Windows Server 2003, Windows XP
Target Platforms
Microsoft Windows Compute Cluster Server 2003, Windows Server 2003 with Compute Cluster Pack Client Utilities, Windows XP with Compute Cluster Pack Client Utilities
See Also
Reference
Cluster Class
Cluster Members
Microsoft.ComputeCluster Namespace
Cluster.AddTask Method
Cluster.CancelTask Method
ListTasks
TaskStatus