ISchedulerJob::RestoreFromXml method

Overwrites the properties and tasks of the job using the XML at the specified URL.

Syntax

HRESULT RestoreFromXml(
  [in] BSTR url
);

Parameters

  • url [in]
    The URL of the XML file that contains the job properties and tasks that are used to update the 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

Typically, you call this method when the job is in the Configuring state. The method changes the values of the local copy. To save the changes, call the ISchedulerJob::Commit method.

The method uses the following Job attributes from the XML file to overwrite the properties with the similar name in the job:

  • AutoCalculateMax
  • AutoCalculateMin
  • FailOnTaskFailure
  • IsExclusive
  • JobTemplate
  • MaxCores
  • MaxCoresPerNode
  • MaxMemory
  • MaxNodes
  • MaxSockets
  • MinCores
  • MinCoresPerNode
  • MinMemory
  • MinNodes
  • MinSockets
  • Name
  • NodeGroups
  • OrderBy
  • Priority
  • Project
  • RequestedNodes
  • RuntimeSeconds
  • RunUntilCanceled
  • SoftwareLicense
  • UnitType
  • UserName

The method uses the following Task attributes from the XML file to overwrite the properties with the similar name in the task:

  • CommandLine
  • DependsOn
  • EndValue
  • IncrementValue
  • IsExclusive
  • IsParametric
  • IsRerunnable
  • MaxCores
  • MaxNodes
  • MaxSockets
  • MinCores
  • MinNodes
  • MinSockets
  • Name
  • RequiredNodes
  • RuntimeSeconds
  • StartValue
  • StdErrFilePath
  • StdInFilePath
  • StdOutFilePath
  • WorkDirectory

For details of the schema, see Job Schema and Task Schema.

Requirements

Product

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

Type library

Microsoft.Hpc.Scheduler.tlb

See also

ISchedulerJob

IScheduler::CloneJob