ICluster.CancelJob Method
Cancels the specified job.
Namespace: Microsoft.ComputeCluster
Assembly: CcpAPI (in ccpapi.dll)
Usage
Syntax
'Declaration
Sub CancelJob ( _
jobId As Integer, _
message As String _
)
void CancelJob (
int jobId,
string message
)
void CancelJob (
int jobId,
String^ message
)
void CancelJob (
int jobId,
String message
)
function CancelJob (
jobId : 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.
message
A message that describes the reason why the job was canceled. The message is limited to 320 Unicode characters. Can be empty.The message is stored with the job. To get the message, access the IJob.ErrorMessage property.
Remarks
The job is removed from the queue but remains in the cluster until the value of the TTLCompletedJobs cluster configuration parameter is exceeded. For a description of this parameter, see the ICluster.SetClusterParameter method.
To cancel a job, the job's status must be: not submitted, queued, or running. If the job is running tasks when the job is canceled, the tasks are terminated and marked as failed. If you queue the job again, the tasks that were finished when the job was canceled stay finished, but all other tasks are queued (including those that failed).
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.AddJob Method
CancelJobs
CancelTask