To synchronously launch scripts and executables on various platforms as part of a chain, add a step that includes a Script Runner Run Script command. The connection supports the execution of native binaries, batch, and shell scripts on Microsoft Windows® and non-Windows platforms.
To enable this command, an IT admin first sets up a Script Runner connector.
Run Script
Runs an arbitrary script
Note: These parameters are single-executable. To provide incremental parameters and controls used by the executable, use the Arguments input. Additionally, each parameter must be a separate element in the Command input.
Windows Batch Script Inputs
For a Windows batch script, such asecho %1 %2
:
Input | Detail |
Command | Enter the path to the .BAT file of the batch script to run |
Arguments | Enter the parameters of the batch script. Press Enter after each parameter. |
Python Script Inputs
For a Python® script that requires two parameters:
Input | Detail |
Command | Enter the path to the .EXE file of the Python script to run |
Arguments | Enter the script name, followed by the parameters of the Python script. Press Enter after each. |
Windows CLI Command Inputs
For a Windows command-line interface (CLI) command, most are a function under the cmd.exe
executable:
Input | Detail |
Command | To execute cmd.exe , enter its path such as C:\Windows\System32\cmd.exe |
Arguments | Enter the functions to pass as parameters. For example, to list the files in a directory, /C dir c:\temp |
Linux or macOS Command Inputs
For a Linux® or macOS CLI command, most are a function under the sh
executable:
Input | Detail |
Command | To execute sh , enter its path such as /bin/sh |
Arguments | Enter the functions to pass as parameters. For example, to list the files in a directory, c ls -1 /home/demouser/ |
Other Script Inputs
For other scripts:
Input | Detail |
Command | Enter the command to run, such as sh , bash , .\script.bat |
Arguments | Enter the arguments to pass to the command. Press Enter after each argument. |
Outputs
Output | Output Type |
Exit Code | Integer |
Output | String |
Exit Codes
Code | Type | Detail |
0 | Success | Success |
1 | Error | Invalid inputs |
2 | Error | Task failed |