Scope
- The script starts an existing order for a job chain in a JobScheduler Master instance.
- PowerShell script is operational for command line execution with Windows, Linux, MacOS.
- The script is a wrapper that demonstrates usage of the JobScheduler PowerShell CLI.
Script
Download
- Download Start-JobSchedulerOrder.ps1
Usage
Syntax
Start-JobSchedulerOrder.ps1 [-JobChain] <String> [-Order] <String> [[-Parameters] <String>]
[[-At] <String>] [[-State] <String>] [[-EndState] <String>] [[-Id] <String>] [[-Url] <Uri>] [[-Credentials]
<PSCredential>] [[-Separator] <String>] [<CommonParameters>]
Help
To display help information execute the following commands:
- Windows
- Get Help Overview
pwsh.exe -c ./Start-JobSchedulerOrder.ps1 -?
- Get Detailed Help
pwsh.exe -c Help ./Start-JobSchedulerOrder.ps1 -Detailed
- Get Help Overview
- Linux, MacOS
- Get Help Overview
./Start-JobSchedulerOrder.ps1 -?
- Get Detailed Help
pwsh -c Help ./Start-JobSchedulerOrder.ps1 -Detailed
- Get Help Overview
Functionality
- The script is executable from the command line
- for Windows by use of the
pwsh.exe
PowerShell interpreter like this:pwsh.exe -f ./Start-JobSchedulerOrder.ps1 -JobChain /bjb/shell_chain -Order sample_order
- for Linux and MacOS by directly calling the script and by implictly using the shebang (
#!/usr/bin/pwsh
) to reference the interpreter like this:./Start-JobSchedulerOrder.ps1 -JobChain /bjb/shell_chain -Order sample_order
- for Windows by use of the
- Use of JobScheduler PowerShelll CLI
Code
- Explanations
- Basically the script is about the following operations:
- Import the JobScheduler Module
- Connect to the JOC Cockpit REST Web Service
- Add an order to the JobScheduler Master
- Disconnect from the JOC Cockpit REST Web Service
- Follow above instructions about getting help to see detailed information about parameters
- Basically the script is about the following operations:
Examples
To display examples execute the following commands:
- Windows
- Get Examples
pwsh.exe -c Help ./Start-JobSchedulerOrder.ps1 -Examples
- Get Examples
- Linux, MacOS
- Get Examples
pwsh -c Help ./Start-JobSchedulerOrder.ps1 -Examples
- Get Examples