IScheduler::CreateJob method

Creates a job.

Syntax

HRESULT CreateJob(
  [out] ISchedulerJob **job
);

Parameters

  • job [out]
    An ISchedulerJob interface that defines the newly created job. The job uses the default job template to specify the job's default property values and constraints.

Return value

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

Remarks

To specify a specific template to use, call the ISchedulerJob::SetJobTemplate method.

After defining the job (setting property values and adding tasks), call the IScheduler::SubmitJob method to add the job to the scheduler and scheduling queue. If the job is not ready to be added to the scheduling queue, you can call the IScheduler::AddJob method to add the job to the scheduler.

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

IScheduler

IScheduler::AddJob

IScheduler::CancelJob

IScheduler::CreateCommand

IScheduler::SubmitJob

IScheduler::OpenJob