Delivery management commands

execute delivery

This command runs a delivery in the connected runtime.

execute delivery <delivery>
    [mode <memory | standalone>]
    [configuration <configuration>]
    [var <variable_path> <variable_value>]
    [synch]
    [sessionName <session_name>]
    [repository <repository_name>]
    [format <format>]
    [logLevel <log_level>]
    [returnCodePath <variable_name>]
Option Mandatory Description

mode

No

memory mode starts the delivery in the current runtime process.

standalone mode starts the delivery in a separate process.

configuration

No

When working with multi-configuration deliveries, specifies which configuration file to use.

var <variable_path> <variable_value>

No

Pass variables value to the delivery. You can use this option multiple times.

synch

No

Wait for the session to complete before proceeding.

sessionName

No

Specifies a session name. If unset, the session is named after the delivery.

repository

No

Repository in which to look for deliveries. This option requires you to use a deliveries repository.

format

No

Customized format for the command output. The following columns are available: %name,%status,%begindate,%enddate,%configuration,%id,%executionmode,%guesthost,%iter,%launchmode,%runtimehost,%runtimeport,%returncode,%errormessage,%exception,%parentiter

logLevel

No

Level of logging used for the session. See log level for more details about the various log level values.

returnCodePath

No

Path of a session variable that contains the return code of the delivery when the execution completes.

Example 1. Execute delivery
execute delivery myDeliv var ~/myVar1 value1 var "~/my var 2" "value 2"
execute delivery myDeliv repository MyRepo
execute delivery myDeliv format "%name, %id, %returncode"
execute delivery myDeliv format "%name | %id | %begindate | %enddate | %status | %returncode | %errormessage"

get deliveries

This command returns information about available deliveries in the connected runtime.

get deliveries [id <id1,id2,idn>]
    [format <format>]
    [repository <repository>]
Option Mandatory Description

id <id1,id2,idn>

No

Comma-separated list of delivery IDs.

format <format>

No

Comma-separated list of columns to return in the output. The available columns are %name, %builduser, %configuration, %id, %packageid, %processid, %username, %version, %builddate, and %exportdate.

repository <repository>

No

Repository in which to look for deliveries. This option requires you to use a deliveries repository.

Example 2. Get deliveries
get deliveries format %name,%configuration,%builddate,%exportdate

get delivery schedules

This command returns information about delivery schedules, and optionally exports it in a file. Job names do not appear in the list.

get delivery schedules <deliveryName> [to <file>]

Option

Mandatory

Description

to <file>

No

Exports the result to a file.

get list deliveries

This command returns a list of available deliveries in the connected runtime.

get list deliveries [to <file>]

Option

Mandatory

Description

to <file>

No

Exports the output to a file.

get repositories

This command return the list of a deliveries repositories configured for the runtime.

get repositories

remove delivery

This command removes a delivery from a runtime deliveries repository.

The repository can be a local directory, or another form of storage configured as a deliveries repository.

remove delivery <name> [repository <repository>]
Option Mandatory Description

name

Yes

Name of the Delivery to remove.

repository <repository>

No

Repository in which to look for deliveries. This option requires you to set up a deliveries repository.

When this option is not specified, the command looks in the default deliveries repository.

schedule delivery

This command schedules delivery execution on the connected Runtime.

schedule delivery <delivery>
    [scheduleName <schedule_name>]
    [sessionName <session_name>]
    [jobName <job_name>]
    [with command]
    [on host <host_name>]
    [port <host_port>]
    [start <start_date>]
    [end <end_date>]
    [var <path> <value>]
    [var ...]
    [configuration <configuration>]
    [logLevel <log_level>]
    cron <cron_expression>
Option Mandatory Description

scheduleName <schedule_name>

No

Name that identifies this schedule. It is automatically generated if not set.

sessionName <session_name>

No

Specifies a session name. If unset, the session is named after the delivery.

jobName <job_name>

No

Specifies an internal name for the scheduled job. If unset, the job name is the delivery name. For more information, see About the job name.

with command

No

Executes the delivery with the command-line tool. If not set, the delivery starts in-memory in the connected runtime.

on host <host_name>

No

Hostname or address of the runtime host. If not set, uses the connected runtime.

port <host_port>

No

Runtime port.

start <start_date>

No

Start date of the schedule.

end <end_date>

No

End date of the schedule.

configuration

No

When working with multi-configuration deliveries, specifies which configuration file to use.

var <variable_path> <variable_value>

No

Pass variables value to the delivery. You can use this option multiple times.

logLevel

No

Level of logging used for the sessions. See log level for more details about the various log level values.

cron <cron_expression>

Yes

Cron expression to run the schedule.

Example 3. Schedule delivery
schedule delivery myDeliv
    start "2015/12/10 12:55:22"
    end "2015/12/25 12:55:22"
    var ~/myvar myValue
    cron "0 15 10 * * ? *"

About the job name

The runtime tries to avoid concurrency problems by assigning job names to schedules. You cannot run multiple schedules with the same job name at the same time, and job names default to the name of their deliveries. This prevents multiple instances of the same delivery running at the same time, and interfering with each other.

You can use the jobName option to control scheduling, such as running multiple instances of a delivery simultaneously on parallel schedules.

If you try to run schedules with the same name at the same time, only one schedule starts.

Example 4. These two schedules cannot run myDeliv at the same time.
schedule delivery myDeliv var ~/myvar myValue01 cron "0 15 10 * * ? *"
schedule delivery myDeliv var ~/myvar myValue02 cron "0 15 10 * * ? *"
Example 5. These two schedules can run myDeliv at the same time with different job names.
schedule delivery myDeliv jobName job01 var ~/myvar myValue01 cron "0 15 10 * * ? *"
schedule delivery myDeliv jobName job02 var ~/myvar myValue02 cron "0 15 10 * * ? *"