You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 26 Next »

Introduction

Parameters can be set for Jobs and and for Orders.

Job parameters are defined for jobs and are available every time the job is run.

Order parameters are defined for orders and are available to all the jobs in a Job Chain. When the value of an order parameter in a job chain is changed then this new value will be applied at the next start of the order.

Note that when jobs are programmed using the JobScheduler API, job and order parameters are separate objects. Order parameters have priority over - i.e. will overwrite - job parameters of the same name.

Parameters allow a general purpose jobs to be created that are then provided with specific information via the parameters. For example, the file name, current location and target address for a file transfer job could be easily specified using parameters.

Parameters can be used to provide information for either shell jobs - i.e. jobs that run a shell script - or API jobs - i.e. jobs that use the JobScheduler's API Interface. The most widely used API jobs are the JITL - JobScheduler Integrated Template Library jobs that can be included as part of each JobScheduler installation and allow the JobScheduler to carry out a wide range of standard functions.

Article Delimitation

Global Variables

Parameters can be also be set from global variables. This is outside the scope of this article and described in:

Job Chain Node Parameters

Parameters can also be set for job chains and job chain nodes. However these parameters are used differently to job and order parameters and are not described in this article.

For more information about job chain and job chain node parameters see:

Setting Parameters for a Job or an Order in JOE

Parameter elements can be found in JOE - JobScheduler Object Editor, in the Scheduler Elements tree as a sub-elements of every job and order. Each parameter consists of a name and a value.

Setting a Job Parameter

  • Select a job in JOE's element tree view
  • Select the job's Parameter element as shown in the screenshot below
  • Enter a name-value pair in the Name and Value fields as shown in the screenshot below.
  • Click the Apply button
  • Click the Save Configuration icon (top, left) to permanently save the parameters.

Setting an Order Parameter

Order parameters are set in a similar manner to job parameters, by selecting an order's parameter element (not shown in the screen shot above).

Job and Order Parameters as XML

The next two code blocks show the XML generated by JOE for a typical simple job and for a simple order:

A simple job with parameters
<job  order="yes" stop_on_error="no" name="job1">
    <params >
        <param  name="param1" value="Value1-Job1"/>
        <param  name="param2" value="Value2-Job1"/>
    </params>
    <run_time />
</job>
A simple order with parameters
<order  job_chain="shell_with_parameter" id="Order1">
    <params >
        <param  name="param1" value="Value1-Order1"/>
        <param  name="param2" value="Value2-Order1"/>
    </params>

    <run_time />
</order>

Setting Parameters for an Order in JOC

Order parameters can be set in JOC - JobScheduler Operations Center when an order start is configured.

This is done using the Order menu button as shown in the screenshot below.

The Start order parametrized button opens the Start order shell_with_parameter form as shown in the next screen shot.

This form is used to specify a start time (or immediate start) for the order and any parameters

The submit button will start the order at the time specified in the upper part of the form with the parameter name/value pair shown.

The new param button can be used to add a further name/value pair for the order.

A parameter set here will overwrite a parameter with the same name that has been configured for a job.

Reading and Setting Parameters in Shell Scripts

Parameters are exposed for shell scripts as environment variables.

This is described in detail in:

Reading and Setting Parameters in API Jobs

API jobs ...

This is described in detail in:

Further References

Job and Order Parameters

Parameters and Global Variables

 Job Chain Node Parameters

Environment Variables

  • No labels