Use of Environment Variables
- JobScheduler provides a number of environment variables that are available to all jobs.
- These environment variables are valid on the host where JobScheduler is executed.
- Use of the environment variable syntax depends on the operating system:
- For Windows use
%SCHEDULER_JOB_NAME%
- For Unix use
$SCHEDULER_JOB_NAME
or${SCHEDULER_JOB_NAME}
- For Windows use
- Mixed spelling with uppercase and lowercase letters is handled differently depending on the operating system:
- For Windows any mixed spelling can be used, i.e.
%SCHEDULER_JOB_NAME%, %Scheduler_Job_Name%, %SCHEDULER_job_name%
will address the same environment variable. - For Unix the exact spelling has to be used, i.e.
$SCHEDULER_JOB_NAME, $Scheduler_Job_Name, $SCHEDULER_job_name
represent different environment variables, only the first one is valid.
- For Windows any mixed spelling can be used, i.e.
List of generally available Environment Variables
List of job specific Environment Variables
Environment Variable | Job | Description |
---|---|---|
SCHEDULER_SOSFILEOPERATIONS_RESULTSET | YADE JITL Job | A colon separated list of file names for the files that have been transferred |
Explanations
- For job parameters the default setting is to be prefixed with
SCHEDULER_PARAM_
, e.g. the parameterhostname
will becomeSCHEDULER_PARAM_HOSTNAME
.You can modify this behavior by specifying job parameters to be used without any prefix. This can be achieved by adding the following parameter configuration to your
./config/scheduler.xml
file and by restarting JobScheduler:<params> <param name="scheduler.variable_name_prefix" value="*NONE"/> </params>
With this setting a parameter
hostname
will be provided with the environment variableHOSTNAME.
You can use an arbitrary prefix by specifying:
<params> <param name="scheduler.variable_name_prefix" value="MY_SCHEDULER_PARAM_"/> </params>
With this setting a parameter
hostname
will be provided with the environment variableMY_SCHEDULER_PARAM_HOSTNAME.
The default value is provided by the implicit setting:
<params> <param name="scheduler.variable_name_prefix" value="SCHEDULER_PARAM_"/> </params>
With this setting a parameter
hostname
will be provided with the environment variableSCHEDULER_PARAM_HOSTNAME.