ICluster::CreateJobFromXmlFile method

Creates a job using the specified XML file.


HRESULT CreateJobFromXmlFile(
  [in]  BSTR xmlDocument,
  [out] IJob **pRetVal


  • xmlDocument [in]
    The absolute path to the XML file that defines the job to create. The file name should include the .xml extension. If the job contains tasks, the tasks are also created. For information about writing the XML string, see Job Schema.

  • pRetVal [out]
    An IJob interface that represents 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, call the ICluster::get_ErrorMessage method.


The initial state of the job is JobStatus_NotSubmitted. After creating the job, call the ICluster::AddJob method to add the job to the cluster. If the XML did not contain tasks, you can then call the ICluster::AddTasks method to add one or more tasks to the job. When the job is ready (you have added all the tasks and set all the job terms), call the ICluster::SubmitJob method to add the job to the scheduling queue.

To add and submit the job in one step, call the ICluster::QueueJob method. If the XML did not contain tasks, call the IJob::AddTask method to add tasks to the job before calling the QueueJob method.



Compute Cluster Pack Client Utilities

Type library


See also