ISchedulerJob::CreateTask method

Creates a task.

Syntax


HRESULT CreateTask(
  [out] ISchedulerTask **ppTask
);

Parameters

ppTask [out]

An ISchedulerTask interface that you use to define the 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

The initial state of the task is Configuring (see TaskState). You can add tasks to the job when the job is in the Configuring state. If the job is running, you can call the ISchedulerJob::SubmitTask method to add the task to the running job.

Examples

For an example, see Creating and Submitting 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::AddTask
ISchedulerJob::GetTaskIdList
ISchedulerTask

 

 

Show: