Share via


ISchedulerJob::GetTaskList method

Retrieves a list of task objects based on the specified filters.

Syntax

HRESULT GetTaskList(
  [in]  IFilterCollection    *filterProperties,
  [in]  ISortCollection      *sortProperties,
  [in]  VARIANT_BOOL         expandParametric,
  [out] ISchedulerCollection **tasks
);

Parameters

  • filterProperties [in]
    An IFilterCollection interface that contains a collection of one or more filter properties used to filter the list of tasks. If NULL, the method returns all tasks.

  • sortProperties [in]
    An ISortCollection interface that contains a collection of one or more sort properties used to sort the list of tasks. If NULL, the list is not sorted.

  • expandParametric [in]
    Set to VARIANT_TRUE to include parametric instances in the results; otherwise, VARIANT_FALSE.

  • tasks [out]
    An ISchedulerCollection interface that contains a collection of one or more tasks that match the specified filter criteria. Each item in the collection is a VARIANT of type VT_DISPATCH. Query the pdispVal member for the ISchedulerTask interface.

Return value

If the method succeeds, the return value is S_OK. Otherwise, the return value is an error code.

Remarks

If you specify more than one filter, a logical AND is applied to the filters (for example, return tasks that are running and have exclusive access to the nodes).

Only the job owner or administrator can list the tasks in a job. The job must have been added to the scheduler before calling this method.

Examples

For an example, see Cloning a Job.

Requirements

Product

HPC Pack 2008 R2 Client Utilities, HPC Pack 2008 Client Utilities

Type library

Microsoft.Hpc.Scheduler.tlb

See also

ISchedulerJob

ISchedulerJob::GetTaskIdList