Run Deliveries
You can run deliveries on runtimes from the command line or from Semarchy xDI Production Analytics.
Refer to Manage Runtime Deliveries for more information on starting deliveries from Semarchy xDI Production Analytics
Run a Delivery from the Command Line
Two scripts are available in the runtime installation folder to run deliveries:
-
startdelivery.sh|bat
: The start delivery script creates a new Java process and runs the delivery as a standalone process without the need of a running runtime. -
startcommand.sh|bat
: This script allows you to connect to a runtime and runs the execute delivery command to run that delivery. See Execute Delivery for more information about this command.
To optimize resource consumption, preferably use the startcommand script, as all the deliveries will be executed in an existing runtime, saving the overhead of a new Java process. |
Start Delivery Script
The start delivery script has two main syntaxes to start a delivery by its name or by its file name.
./startdelivery.sh -name [DELIVERY_NAME]
./startdelivery.sh -file [DELIVERY_FILE]
The start delivery script is synchronous, and has the following return codes:
-
For Windows:
-
0
: The session was completed successfully. -
-1
: The session did not complete successfully. -
-2
: The session was stopped by a user.
-
-
For Linux/Unix/macOS:
-
0
: The session was completed successfully. -
255
: The session did not complete successfully. -
-2
: The session was stopped by a user.Refer to Exit Codes With Special Meanings for more information about return codes for Unix.
-
Variables
You can pass variable values to the delivery using the following syntax:
./startdelivery.sh -name [DELIVERY_NAME] \
-var [VARPATH1] [VALUE1]
...
-var [VARPATHN] [VALUEN]
For example:
./startdelivery.sh -name myDelivery \
-var ~/var1 value1
Configuration
When working with multi-configuration deliveries, you can pass the configuration to use for the execution using the following syntax:
./startdelivery.sh -name [DELIVERY_NAME] \
-configuration [CONFIGURATION_NAME]
Session Name
By default, the session name is the same as the delivery name. You can set a specific name for the session using the
./startdelivery.sh -name [DELIVERY_NAME] \
-sessionName [SESSION_NAME]
Repository
If your runtime is configured to use a deliveries repository, you can provide the repository name. The delivery is searched in the specified repository.
./startdelivery.sh -name [DELIVERY_NAME] \
-repository [REPOSITORY_NAME]
Return Code Path
You can retrieve the path of a session variable that contains the code returned by the script when the execution completes.
./startdelivery.sh -name [DELIVERY_NAME] \
-returnCodePath [VARIABLE_NAME]
./startdelivery.sh -name MyDelivery \
-returnCodePath CORE_DURATION
./startdelivery.sh -name MyDelivery \
-returnCodePath ~/MyProcess/MyVariable
Log Level
You can specify the level of logging used for the session.
./startdelivery.sh -name [DELIVERY_NAME] \
-loglevel [LOG_LEVEL]
Refer to log level for more information on various log level values.