ICluster::CheckAnyTask method
Checks for tasks in the job that have finished, failed, or been canceled and returns the task.
Syntax
HRESULT CheckAnyTask(
[in] long jobId,
[in, out] VARIANT *Timestamp,
[out] ITask **pRetVal
);
Parameters
jobId [in]
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 call the IJob::get_Id method to get the identifier.Timestamp [in, out]
An opaque value used by the method to determine the tasks that have finished, failed, or been canceled since the last call. Set this value to NULL on the first call and then do not change the value on subsequent calls.pRetVal [out]
An ITask interface that represents the task that finished, failed, or was canceled. Is NULL otherwise.
Return value
If the method succeeds, the return value is S_OK. Otherwise, the return value is an error code. To get a description of the error, call the ICluster::get_ErrorMessage method.
Remarks
This method is meant to be called in a loop for the number of tasks in a job. To determine the number of tasks in a job, call the IJob::get_TaskCount method. The loop should sleep between iterations. The order that the tasks are returned is arbitrary.
Requirements
Product |
Compute Cluster Pack Client Utilities |
Type library |
Ccpapi.tlb |