Creating and Submitting a Job

In addition to monitoring and controlling jobs already deployed on the Backburner network, you can use the Backburner Client API for creating and submitting new jobs.

The following procedure outlines the steps in job creation. For details, see the code sample submitJob.C.

To create and submit a job:

  1. Create the job node.

    Call WireTapNodeHandle::createNode() on the joblist node (/jobs), specifying the node type and display name.

    • The node type must be of type JOB.
    • The display name appears in the Backburner Monitor as the job name. The display name must be unique across all jobs.
    • The job node is automatically populated with the current local user, host, date, and time.
    • The resulting job node is empty and in the suspended state.
  2. Specify basic job information.

    Call WireTapNodeHandle::setMetadata() on the new job node, specifying the info metadata stream. This sets the information needed by all jobs. The pluginName and numTasks fields are mandatory.

  3. Specify job- or renderer-specific information (optional).

    Call WireTapNodeHandle::setMetadata() on the new job node, setting the details or xmlDetails metadata stream as desired to set job or renderer-specific data.

  4. Attach a file (optional).

    Call WireTapServerHandle::pushStream to attach any file for transfer. The stream ID for the attachment for a given job node is simply the job’s node ID. See Sending Attachments to the Backburner Manager.

  5. Set the job state to waiting.

    By default, jobs are in a suspended state when created. The last step in job creation is to submit the job for processing by changing its state to waiting.

    Call WireTapNodeHandle::setMetadata() on the job node’s state metadata stream, setting the state to waiting.