Share via


ISchedulerJob::OpenTask method

Opens a task.

Syntax

HRESULT OpenTask(
  [in]  ITaskId        *id,
  [out] ISchedulerTask **ppTask
);

Parameters

  • id [in]
    An ITaskId interface that identifies the task to open.

  • ppTask [out]
    An ISchedulerTask interface to the opened task.

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, access the ISchedulerJob::ErrorMessage property.

Remarks

You can use the IScheduler::CreateTaskId or IScheduler::CreateParametricTaskId method to create the task identifier.

Only the job owner or administrator can open the task.

Examples

For an example, see Implementing the Event Handlers for Job Events in C++.

Requirements

Product

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

Header

Azroles.h

Type library

Microsoft.Hpc.Scheduler.tlb

See also

ISchedulerJob

ISchedulerJob::AddTask

ISchedulerJob::CreateTask

ISchedulerJob::GetTaskIdList

ISchedulerTask