Cluster.CheckAnyTask Method
Checks for tasks in the job that have finished, failed, or been canceled and returns the task.
Namespace: Microsoft.ComputeCluster
Assembly: CcpAPI (in ccpapi.dll)
Usage
Syntax
'Declaration
Public Function CheckAnyTask ( _
jobId As Integer, _
ByRef timestamp As Object _
) As ITask
public ITask CheckAnyTask (
int jobId,
ref Object timestamp
)
public:
virtual ITask^ CheckAnyTask (
int jobId,
Object^% timestamp
) sealed
public final ITask CheckAnyTask (
int jobId,
/** @ref */ Object timestamp
)
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.
- timestamp
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.
Return Value
An ITask interface that represents the task that finished, failed, or was canceled. Is NULL otherwise.
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, access the Job.TaskCount property. The loop should sleep between iterations. The order that the tasks are returned is arbitrary.
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
JobCounter
Task.Status