Command Line Syntax

Top  Previous  Next

 

The syntax to use Pipeline Runner to execute a script from the command line is remarkably simple:

 

Pipeline Runner Command

 

The main part of the command is simply the fully qualified path and file name for the Pipeline runner executable, for example:

 

C:\PipelineRunner\pipelinerunner.exe

lamp Note: Using the fully qualified path and file name will allow you to run PipelineRunner regardless of where it is located. Alternatively you could navigate the command prompt to the folder containing the executable and use the program name only.

Script File

 

After the Pipeline Runner Command, leave a space and put the fully qualified path and file name of the script or project to run before any other command line switches, for example:

 

"C:\Scripts\Test Script.txt"

 

Scripts should have the extension txt. Projects should have the extension prp.

 

Command Line Switches

 

In order to control how the Pipeline Runner works from the command line you can add command line switches. The switches are prefixed with a hyphen, and where a supporting value is required it should be set out as a key-value pair:

 

-switch=value

 

The currently available switches are:

 

-exclude or -e

Pass this switch to exclude one or more Tasks (linked to User Sections of the script) from the run. Any user section associated with the task listed here will be simply ignored when the script executes. The value should be either a single string representing the Task Name of the Task to exclude, or a list of tasks separated with a Pipe character if you want to specify the exclusion of multiple Tasks. There should be no spaces between the pipe character and the preceding and following task names or that will cause an error. You should surround the exclusion list with double quotes if there are any spaces in any of the Task names. It is good practice to include the quotation marks in any case, so that it reduces the risk of error if for example you use a variable that may contain spaces when evaluated.

 

-file or -f

This switch is optional. You can prefix the fully qualified script file name with this switch if you wish to do so. The value must be surrounded by quotation marks if one or more spaces are included in the path and file name. It is good practice to include the quotation marks in any case, so that it reduces the risk of error when writing scripts.

 

-p

Pass this switch to cause the runner to output progress information to the console. No value is required for this switch. This switch will have no effect if used with the -v switch.

 

-pw

Pass this switch to assign a runtime password.

lamp IMPORTANT: If you do not pass a runtime password when one is required, or you pass one when it is not required, the run or validation will fail and an error will be returned.

-r

Pass this switch to cause the runner to write a report to disk as the script is processed. The value should be the fully qualified name for the report file. The value must be surrounded by quotation marks if one or more spaces are included in the path and file name. It is good practice to include the quotation marks in any case, so that it reduces the risk of error when writing scripts. This switch will have no effect if used with the -v switch

lamp IMPORTANT: This switch can be overridden by the script content. If you set the report based Setup Section Variables in your script they will take precedence over the command line switches.

-v

Pass this switch to cause the runner to validate the script or project, but not process it. No value is required for this switch

 

-xe

Pass this switch to cause the runner to include extended error information in any report that is generated. Use in conjunction with the -r flag to ensure that the extended information is written to disk.

 

lamp Note: Pipeline Runner Studio has the ability to automatically automatically generate the full Command Line with a single click.

Examples

 

Simple run of a script:

 

C:\PipelineRunner\pipelinerunner.exe "C:\Scripts\Test Script.txt"

 

Simple run of a script that has a runtime password:

 

C:\PipelineRunner\pipelinerunner.exe "C:\Scripts\Test Script.txt" -pw="MyPassword"

 

Using the file switch:

 

C:\PipelineRunner\pipelinerunner.exe -file=C:\Scripts\Test Script.txt

 

Validate the script only:

 

C:\PipelineRunner\pipelinerunner.exe C:\Scripts\Test Script.txt -v

 

Run the script excluding a single task:

 

"C:\PipelineRunner\pipelinerunner.exe" "C:\Scripts\Test Script.txt" -e="Task 1"

 

Run the script excluding multiple tasks:

 

C:\PipelineRunner\pipelinerunner.exe C:\Scripts\Test Script.txt -e="Task 1|Task 2"

 

Run the script and write a report to disk:

 

C:\PipelineRunner\pipelinerunner.exe C:\Scripts\Test Script.txt -r=C:\Documents\Test Script Report.txt

 

Run the script and write a report to disk including extended error information:

 

C:\PipelineRunner\pipelinerunner.exe C:\Scripts\Test Script.txt -r=C:\Documents\Test Script Report.txt -xe

lamp Important: The examples above are fictitious and the specified files and folders may not exist on your system. The paths and file names should be replaced with your own when you are using the command line syntax.

See Also: Automatically Generate a Command Line Run a Script from the Windows Command Line User Sections Tasks Section