Documentation/Scripts/Script Execution History

From ScriptRunner
Jump to: navigation, search


Documentation :: Scripts :: Script Execution History

Every time ScriptRunner runs a script, be it triggered by a schedule or someone manually running, the a record of it running is stored by ScriptRunner, as is the stdout and stderr output from the script. This history can be viewed in the Script Execution History area of ScriptRunner.


Viewing Script History

  • From the menu, select Script Management > View Script Execution History.
    • Time: This is the time the script was requested to run, and does not necessarily mean the script started at this time.
    • Script: This is the name of the script run, as defined by Editing Scripts .
    • User: This is the user that requested the script to run. Where ScriptRunner is denoted as the user, this means it was a scheduled occurrence either from a Time or Batch scheduled script.
    • Status: This is the current status of the script. You can view script status definitions here .
    • View Output: Click this to view more details information about a given Script Execution, as well as the log output from it.
  • The Script Execution History list should now be shown.

    ScriptExecutionHistory.png
  • You can filter the scripts shown using the Status and Script options at the top of the page, and then clicking Search.png.
  • To navigate through pages you can click the Next.png and Previous.png buttons. Script Executions will be shown in descending time order using the time the script was requested to run.
  • Click ViewOutput.png to view more information about a specific execution. Doing so will show the Run window for that given script execution.

    ScriptExecution.png

    • Execution Script: The is the exact command that ScriptRunner executed.
    • Status: The is the current status of the script. You can view script status definitions here .
    • Start Time: This is the time that the script was requested to run by ScriptRunner.
    • Return Code: This is the return code given by the script upon completion.
    • Runtime: This is the length of time the script took to run from the time ScriptRunner successfully started the script (this is not the same as the time is was requested), to the time the script process completed.
    • Reference: If enabled within a script, ScriptRunner can request a user to provide a manual reference when running a script such as an incident or change number. This is where it will be displayed.
    • Hostname: This is the host that executed the script.
    • Log Output: This is where the output of the script will be displayed. ScriptRunner will capture both stdout and stderr.
      If a script is still in RUNNING status, then this will be periodically updated while the script continues to run.
  • Click Close.png to close the output window if opened.