Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Job parameter and order params are accessible by the use of environment variables. There is a rule for the name of such an environment variable. The name of the environment variable according to a parameter is SCHEDULER_PARAM_NAMEOFPARAM. For example the job parameter param1 is available by the environment variable SCHEDULER_PARAM_PARAM1 (always in upper case letters).

Sample

for Windows

Code Block
 <job>
    <params>
        <param name="param1"  value="Test"/>
    </params>
    <script language="shell">
        <![CDATA[
 rem This is a sample shell script to demonstrate the use of parameters
 echo Param1 has the value %scheduler%SCHEDULER_paramPARAM_param1%PARAM1%
        ]]>
    </script>
    <run_time/>
 </job>

...

Code Block
 <job>
    <params>
        <param name="param1" value="Test"/>
    </params>
    <script language="shell">
        <![CDATA[
 # This is a sample shell script to demonstrate the use of parameters
 echo "Param1 has the value $SCHEDULER_PARAM_PARAM1"
        ]]>
    </script>
    <run_time/>
 </job

...

Code Block
 <job order="yes"
     stop_on_error="no">
    <params>
        <param name="param1"  value="Test"/>
    </params>
    <script language="shell">
        <![CDATA[
 rem This is a sample shell script to demonstrate the use of parameters 
 echo newParam=a sample value >> %scheduler%SCHEDULER_returnRETURN_values%VALUES%
        ]]>
    </script>
    <run_time/>
 </job>

...

Code Block
 <job order="yes"
     stop_on_error="no">
    <params>
        <param name="param1" value="Test"/>
    </params>
    <script language="shell">
        <![CDATA[
 echo newParam has the value %scheduler%SCHEDULER_paramPARAM_newParam%NEWPARAM%
        ]]>
    </script>
    <run_time/>
 </job>

...