Scope
- JobScheduler offers Powershell as a language for implementation of Jobs
- Powershell Jobs have to been seen as the analogy for the Shell Jobs, even though there are some differences between Shell and Powershell Jobs
- The decision to include Powershell as a language for JobScheduler (among others) is in the same line with the development of Microsoft programming languages
- Powershell Jobs can only be run on Agents and not on the Master
Feature Availability
FEATURE AVAILABILITY STARTING FROM RELEASE 1.10.5
Powershell as a Shell
As mentioned before, Powershell Jobs should be seen as the analogy for Shell Jobs in the future. That means, every Shell job should be able to be (with any or few changes) converted into a Powershell job.
Nevertheless, there are some compatibility issues described below.
Calling Order parameters or Job parameters
Example Shell: myscript.cmd %SCHEDULER_PARAM_NAME1% Example Powershell: myscript.cmd $env:SCHEDULER_PARAM_NAME1
Returning a parameter an its value to an Order
Example Shell: echo NAME1 = VALUE1 >> %SCHEDULER_RETURN_VALUES% Example Powershell: echo "NAME1 = VALUE1" >> $env:SCHEDULER_RETURN_VALUES%
Exit Code Handling
The following example throws no error in Shell but it breaks at line 2 and ends in an error for Powershell:
echo job is starting abcde echo job is finishing
The same example would be working in Powershell the following way:
echo job is starting try{abcde} catch{} echo job is finishing
This type of differences described above will be furhter supported like this from JobScheduler and seen as natural differences between the Shell and Powershell languages.
Examples
Example: Powershell as a Shell
tbd
Example: Powershell API Jobs
tbd
Example: Combination of both
tbd
Extras: CLI for Powershell Jobs
tbd