Versions Compared

Key

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

...

Acessing parameters, comming from an order or a job, by environment variables makes it easy to use a generic job for executing powershell scripts. the order- (or job-) parameters has to specifiy the name of the script and some more parameters, which will be accessed then by the powershell script.

Code Block
 <job title="Execute a PowerShell Script"
      order="yes"
      stop_on_error="no">
    <script language="shell">
        <![CDATA[
  powershell -nologo -NonInteractive -noprofile -file "%SCHEDULER_PARAM_SCRIPT_FILENAME%" 
  exit %errorlevel%
        ]]>
    </script>
    <monitor name="configuration_monitor"
             ordering="0">
        <script java_class="sos.scheduler.managed.configuration.ConfigurationOrderMonitor"
                language="java"/>
    </monitor>
    <run_time/>
 </job>

...