Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-1736

JobScheduler should consider command errors from PowerShell jobs

    XMLWordPrintable

Details

    Description

      Current Situation

      • When a PowerShell job executes a Windows command (not: PowerShell cmdlet) and an error is raised then PowerShell sets the $LastExitCode variable.
      • The value of this variables is not considered, i.e. jobs are treated as being successful in spite of this variable being set to a non-zero value.
      • A sample job that shows this problem looks like this:
        <job  order="yes" stop_on_error="no" process_class="Agent_01">
            <script  language="powershell">
                <![CDATA[
        hostname hallo
                ]]>
            </script>
        
            <run_time />
        </job>
        

      Desired Behavior

      • JobScheduler should consider the value of the LastExitCode variable:
        • $LastExitCode = 0 signals success
        • $LastExitCode != 0 signals error

      Attachments

        Activity

          People

            re Robert Ehrlich
            ap Andreas PĆ¼schel
            Mahendra Patidar Mahendra Patidar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: