ICluster.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
Function CheckAnyTask ( _
    jobId As Integer, _
    ByRef timestamp As Object _
) As ITask
ITask CheckAnyTask (
    int jobId,
    ref Object timestamp
)
ITask^ CheckAnyTask (
    int jobId, 
    Object^% timestamp
)
ITask CheckAnyTask (
    int jobId, 
    /** @ref */ Object timestamp
)

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.
  • 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 IJob.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

ICluster Interface
ICluster Members
Microsoft.ComputeCluster Namespace
IJobCounter
ITask.Status