Versions Compared

Key

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

Table of Contents

Introduction

  • User might be interested to automatically receive reports about the JS7 - Task History that state what jobs have been executed for what date and time and the respective execution result.
    • Such reports include similar information as available from the JOC Cockpit's Task History view.
    • The reports are provided as Excel® files similar to what is available for export from the JOC Cockpit Task History view.
  • Such reports can be scheduled, for example on a daily basis, to provide ongoing information about completed tasks and execution results.

Report the Task History from a Job

Task History reports can be automated by by JS7 jobs. The following PowerShell modules are used for this purpose:

...

Find a sample report for download that includes the report with its Task-History worksheet: jobscheduler_reporting.xlsx

First Line of the Job

The only difference between platforms is the way how PowerShell is invoked with the first line of the job.

...

  • Credits for the Windows shebang replacement to How to run a PowerShell script within a Windows batch file
  • If you consider this shebang replacement somewhat cryptic then add it to JS7 - Script Includes that are easily referenced from a shell job, for example by using ##!include pwsh
  • The PowerShell executable pwsh.exe is available starting from PowerShell 6.0. PowerShell releases 5.x use the executable powershell.exe that can be specified accordingly with the shebang.

Job Implementation

Please consider that the below job is an example that has to be adjusted for your environment.

...