Command-Line Job Execution Utility (adtExec)

The Command-Line Job Execution Utility can be used to execute adTempus jobs from the command line, batch files, scripts, etc. You can use this utility, for example, to start a job from a batch file, or to create a desktop shortcut that starts a job.

The program is named "adtexec.exe" and can be found in the adTempus program directory. This tool is command-line driven and does not present an interactive user interface.

adtExec uses the same authentication as the adTempus Console: the user executing the utility must have Execute permission for the job.

Command-Line Syntax

adtExec has the following syntax:

adtexec job [options]

All parameters except the job are optional.

Parameter

Meaning

job

Specify the name (enclose in quotes if it contains spaces or other punctuation) or Job ID (available from the job properties window) of the job you want to execute.

-agents:"agentName" [...]

Runs the job on the specified agent(s) only. Specify multiple values as show or by repeating the -agents parameter on the command line.

-checkpoint:"checkpoint"

The checkpoint value to pass to the job

-force[{+|-}]

Forces a new instance of the job even if an instance is already running and the job's settings specify otherwise. Default value: True.

-forcemaster[{+|-}]

Forces the job to run on the Master even if it is not configured to run there. Default value: False.

-ignoreheld[{+|-}]

Forces the job to run even if it is held. Default value: True.

-ignoreheldqueue[{+|-}]  

Forces the job to run even if the queue to which it belongs is held. Default value: True.

-ignorejobconditions[{+|-}]

Ignores job-level conditions. Default value: True.

-ignorestepconditions[{+|-}]

Ignores step-level conditions. Default value: False.

-list

Lists all jobs that you have permission to execute; does not execute jobs. If you specify a partial job name, all jobs matching that name will be listed. For example

adtexec warehouse -list

will list all jobs containing the text "warehouse".

-masteronly[{+|-}]

Run the job only on the Master even if it is configured to run on Agents. Default value: False.

-user:"userID"

The Windows user ID to use when connecting to adTempus. If not specified, the connection is made under the identity of the account running adtexec.

-password:"password"

The password to use when connecting to adTempus. If not specified, the connection is made under the identity of the account running adtexec.

-responses:value

Determines which Responses will be executed for the job. Valid values:

  • all: Execute all Responses

  • none: Do not execute any Responses

  • nojob: Execute Responses except Job Control actions

Default value: all.

-server:"serverName"

The name or IP address of the adTempus server to connect to. To connect to the local server, do not specify a value.

-steps:"stepNumber"

Specify the step number(s) to execute. You may use ranges or lists. For example: "2-4", "3-", "1,3,4"

-variables:""name=value"" [...]

Overrides for job variables defined for the job. Specify multiple values as show above or by repeating the -variables parameter on the command line.

-wait[{+|-}]

Wait until the job finishes executing. If not specified, adtexec returns immediately after submitting the job. Default value: False.

Examples

The following command runs job "myjob" in group "group1" and waits for it to finish, using the following settings:

adtexec "group1\myjob" -wait -steps:"2-4" -responses:nojob -force- -variables:"ExecutionSource=CommandLine"