Share via


ISchedulerJob::SetJobTemplate method

Sets the job template to use for the job.

Syntax

HRESULT SetJobTemplate(
  [in] BSTR name
);

Parameters

  • name [in]
    The name of the template to use for this job.

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

To get the template specified for the job, access the ISchedulerJob::JobTemplate property. To get a list of available templates, access the IScheduler::GetJobTemplateList scheduler property.

HPC maintains the following three property values for each property:

  • The value set by the user
  • The template value if specified by the template
  • A default value

If the user sets the property value, the user-defined value is used. If not, the template value is used. If the user and template do not specify a value, the default property value is used.

For those properties that are defined in both the new and old template, the default values and template values defined in the new template override the values for the same properties defined in the old template. All property values changed by the user remain unchanged. The default values for any properties defined in the old template that are not also defined in the new template are retained. The method does not validate the job's property values against the new template until the scheduler tries to run the job.

Requirements

Product

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

Type library

Microsoft.Hpc.Scheduler.tlb

See also

ISchedulerJob

ISchedulerJob.JobTemplate