ICluster.CancelTask Method

Cancels the specified task.

Namespace: Microsoft.ComputeCluster
Assembly: CcpAPI (in ccpapi.dll)

Usage

Syntax

'Declaration
Sub CancelTask ( _
    jobId As Integer, _
    taskId As Integer, _
    message As String _
)
void CancelTask (
    int jobId,
    int taskId,
    string message
)
void CancelTask (
    int jobId, 
    int taskId, 
    String^ message
)
void CancelTask (
    int jobId, 
    int taskId, 
    String message
)
function CancelTask (
    jobId : int, 
    taskId : int, 
    message : String
)

Parameters

  • jobId
    The job identifier. The ICluster.AddJob method returns this value. If you have an instance of the job that has already been added to the cluster, you can access the IJob.Id property to get the identifier.
  • taskId
    The task identifier. To get this value, access the ITask.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 ITask.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 ITask.Status property.

You can call the ICluster.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

ICluster Interface
ICluster Members
Microsoft.ComputeCluster Namespace
ICluster.AddTask Method
ICluster.CancelTask Method
ListTasks
TaskStatus