Skip to end of metadata
Go to start of metadata

Update Information

Icon
  • This article is deprecated and applies to JobScheduler releases up to 1.9
  • Starting from JobScheduler Release 1.10.5 native support for PowerShell is available
  • For detailed information see PowerShell Jobs
    FEATURE AVAILABILITY STARTING FROM RELEASE 1.10.5

Scope

  •  You can use the JobScheduler PowerShell Adapter to create jobs or pre-processing and post-processing Monitors that use the JobScheduler API in PowerShell.
  • This feature is provided by
    • JS-1596 - Provide PowerShell adapter class for 32bit and 64bit systems with JobScheduler Master Released
    • FEATURE AVAILABILITY STARTING FROM RELEASE 1.9 FEATURE AVAILABILITY ENDING WITH RELEASE 1.10
  • Future releases will use a new interface that is available with
    • JS-1595 - JobScheduler Agent supports PowerShell scripting language for jobs and monitors Released

Requirements

  • Windows Machine with a JobScheduler installation
  • .Net Framework 4
  • PowerShell 2 or newer

Installation

  • Download the JobScheduler PowerShell Adapter from http://www.sos-berlin.com/download/scheduler/JobSchedulerPowershellAdapter.zip
  • Unzip the file to the bin directory of your JobScheduler installation
  • Register the assembly by running

    Registration for Windows 32 bit operating systems
    Registration for Windows 64 bit operating systems

Usage

  • The PowerShell Adapter uses the JobScheduler COM interface.
  • Currently, neither COM jobs nor PowerShell jobs are supported by JOE. So, PowerShell jobs need to be configured by manually editing XML files.

Configuring a PowerShell job

  • Have the <script> use the com_class JSPowershellAdapter.JobAdapter
  • define a parameter powershell_script that points to the location of the PowerShell job implementation
    • If the path is relative, it needs to be relative to the SCHEDULER_DATA directory
  • write a PowerShell job implementation that at least implements Function spooler_process()

Example job definition

Example PowerShell job script

 Expand source

Configuring a PowerShell pre-/post-processing Monitor

Only one Powershell pre-/post-processing Monitor can be configured per job.

  • Have the <monitor><script/></monitor> use the com_class JSPowershellAdapter.JobAdapter
  • define a parameter powershell_monitor_script that points to the location of the PowerShell pre-/post-processing Monitor implementation
    • If the path is relative, it needs to be relative to the SCHEDULER_DATA directory
  • write a PowerShell pre-/post-processing Monitor implementation

Example job definition

 

Example PowerShell pre-/post-processing script

 

References

Change Management References

Loading