Predefined Variables
When adTempus runs a job, it sets several job variables automatically. These variables can be used within the job by using substitution tokens. For example, you can include the following text in the command-line parameters for a program to pass it the name of the job: %ADTJobName%.
These variables are also available to scripts, and are defined as environment variables for any programs run by the job.
When you are editing a text field that supports Job Variables, you can use the Insert Variables button (
) to open a text edit window that lets you selected the predefined variables from a list.
Miscellaneous
Miscellaneous variables
| Variable | Description |
| NotificationFromName | The display name to use as the sender for notification messages. Overrides setting in SMTP server properties. |
| NotificationFromAddress | The address to use as the sender for notification messages. Overrides setting in SMTP server properties. |
| DefaultMessage | The default notification message generated for a Notification Action. |
| DefaultSubject | The default notification subject generated for a Notification Action. |
| Message | The current notification message for a notification operation. |
| MessageTimestamp | The timestamp for a notification message. |
| ComputerName | The name of the computer on which adTempus is running. |
| adTempus.InstanceName | The adTempus instance name. |
| adTempus.ServerAndInstanceName | The name of the server and instance, e.g., "computername\instancename". If this is the default instance, will be only "computername". |
| ADTServerPath | The path where adTempus is installed. |
Job
Variables defined for all jobs
| Variable | Description |
| ADTJobID | The unique identifier for the job. |
| JobStatus | The current status of the job. |
| ADTFullyQualifiedJobName | The fully-qualified name of the job, including the group name. |
| ADTJobName | The name of the job, without the group name. |
| ADTTriggerClass |
Each time adTempus starts a job, it sets the "ADTTriggerClass" variable to indicate how the job was started. You can use this variable to run part of a job only when the job is started in a particular way (for example, to run a step only when the job is started by a File Trigger). The variable has one of the following values:
For example, to run a step only when the job is started by a File Trigger, add a Job Variable Condition to the step that tests whether "ADTTriggerClass" equals "FileTrigger", with the condition set not to wait, and set the step to be skipped if the condition is not met. To make a Response conditional, use the option to determine whether the Response is activated with a script, and have the script return adTempus.JobVariables("ADTTriggerClass") = "FileTrigger". If a job has more than one trigger of the same type, you can set additional variables on the Variables page of each trigger's properties to tell them apart. |
| ADTQueueName | The name of the Queue to which the job is assigned. |
| ADTGroupName | The full name of the Group to which the job is assigned. |
| ADTExecutionReason | Text description of the reason the job is being executed. |
| ADTJobRestartCount | The restart attempt number. Will be 0 for first execution attempt, then incremented each time the job is restarted by a Restart action. |
| ADTExecutionAttempt | The execution attempt number. Will be 1 for first execution attempt, then incremented each time the job is restarted by a Restart action. |
| ADTJobNotes | The Description/Notes information for the job. |
| ADJobInstance | The OID of the ExecutionHistoryItem representing this instance of the job. |
| ADTInstanceID | The instance number for this instance of the job. |
| ADTJobTemp | A temporary directory that is automatically deleted at the end of the job. |
| ADTCycleID | The Cycle ID, if any, assigned to the job. |
| Job.ExecutionStart | The date/time at which the job started |
| Job.ExecutionFinish | The date/time at which the job ended, if it has |
| Job.JobSubmitted | The date/time at which the job was submitted for execution. |
| Job.QueueEnter | The date/time at which the job entered its Queue, if it has. |
| Job.QueueLeave | The date/time at which the job left its Queue to begin execution, if it has. |
| Job.ConditionWaitStart | The date/time at which the job began waiting for its Conditions to be met, if it did. |
| Job.ConditionWaitEnd | The date/time at which the job stopped waiting for its Conditions, if it did. |
| Job.AgentWaitStart | The date/time at which the job began waiting for a Remote Agent to become available, if it did. |
| Job.AgentWaitEnd | The date/time at which the job stopped waiting for a Remote Agent, if it did. |
| ADTJobOID | The OID of the job, in the long format (including the class identifier) used by adTempus version 3 and earlier. ADTJobID is the preferred identifier. |
| ADTChainID | An identifier shared by this job instance and any job instances it starts through Job Control Actions, Job Execution Tasks, or Job Triggers. |
| ADTCallingJobOID | The OID of the job that started this job through a Job Control Action or Job Execution Task, if any. |
| ServerName | The name of the computer on which the job is running. |
| InstanceName | The adTempus instance name. |
| ServerAndInstanceName | The name of the server and instance, e.g., "computername\instancename". If this is the default instance, will be only "computername". |
| ControllerName | For a job running on a Remote Agent, the name of the controller computer. |
| ControllerInstanceName | For a job running on a Remote Agent, the adTempus instance name on the controller. |
| ControllerAndInstanceName | For a job running on a Remote Agent, the name of the controller and instance, e.g., "computername\instancename". |
| ADTStepNumber | The step number of the current or most recent step. |
| ADTStepDescription | The description of the current or most recent step, including name if defined, and task description. |
| ADTStepName | The name of the current or most recent step, if defined. |
| StepStatus | The status of the current or most recent step. |
| ADTTaskResult | The exit code or other result from the task run by the current or most recent step. |
| ADTSubmittingUser | The Windows user ID of the user who submitted the job for execution (for manually-submitted jobs only). |
Job Step
Variables defined for job steps. These variables are defined only if a step is currently executing.
| Variable | Description |
| StepStatus | The current status of the Step. |
| ADTJobStep | The OID of the step. |
| ADTStepNumber | The step number. |
| ADTStepDescription | The description of the step, including name if defined, and task description. |
| ADTStepNotes | The Description/Notes information for the step |
| ADTStepName | The name of the step, if defined. |
| ADTJobCheckpoint | The current checkpoint for the step. |
| ADTStepRestartCount | The restart attempt number. Will be 0 for first execution attempt, then incremented each time the job is restarted by a Restart action. |
| ADTServerPath | The path in which the adTempus server executable and related tools are located. |
| JobStep.ExecutionStart | The date/time at which the current step started |
| JobStep.ExecutionFinish | The date/time at which the current step ended, if it has |
| JobStep.StepSubmitted | The date/time at which the current step was submitted for execution |
| JobStep.CapturedConsoleFileName | The path and file name of the captured console output for the step, if any. |
| Step{n}.ADTTaskResult | The result from the task run by step number {n} (e.g., "Step2.ADTTaskResult"). Set by Program Execution, Script Execution, and custom tasks, and retained for the remainder of the job. |
Task: Database Operation
Variables set by Database Operation Tasks
| Variable | Description |
| DatabaseTask.DatabaseResultFile | The path and file name of the file that contains commands executed and results returned by the database. |
| DatabaseTask.DataSetFileNames | A semicolon-delimited list of the file(s) the DataSet data was saved to, if using the option to save DataSet data. |
Task: E-Mail
Variables set by E-Mail Processing Tasks
| Variable | Description |
| EmailProcessing.MessageLocation | Semicolon-delimited list of directories created by message save operations |
| EmailProcessing.SelectedMessageCount | The number of messages selected by the message filter |
Task: File Operation
Variables set by File Transfer and File Compression Tasks
| Variable | Description |
| FileOperationTask.ProcessedFileCount | The number of messages successfully processed by the task |
| FileOperationTask.ErrorMessages | Contains any error messages reported by the task |
| FileOperationTask.SucceededFiles | Contains a comma-delimited list of all the files that were successfully processed |
| FileOperationTask.FailedFiles | Contains a comma-delimited list of all the files for which errors were reported |
Task: Process Termination
Variables set by Process Termination Tasks
| Variable | Description |
| ProcessTermination.KilledProcessCount | The number of processes matching the target process name that were successfully terminated |
| ProcessTermination.FailedToKillProcessCount | The number of processes matching the target process name that were not successfully terminated |
| ProcessTermination.KilledChildProcessCount | The number of processes terminated that were child processes of target processes |
| ProcessTermination.FailedToKillChildProcessCount | The number of processes not terminated that were child processes of target processes |
| ProcessTermination.KilledChildProcesses | Comma-separated list of the names of the child processes that were terminated |
| ProcessTermination.FailedToKillChildProcesses | Comma-separated list of the names of the child processes that could not be terminated |
Task: Program Execution
Variables set by Program Execution Tasks
| Variable | Description |
| ProcessExitCode | The exit code from the process run by the task. |
| ADTTaskResult | The exit code from the process run by the task. |
| ADTProcessID | The Windows process ID (PID) for the executable started by the task. |
Task: Script Execution
Variables set by Script Execution Tasks
| Variable | Description |
| ScriptResult | The result returned by the script. |
| ADTTaskResult | The result returned by the script. |
| ProcessExitCode | For PowerShell scripts, the exit code from the PowerShell process. |
| ADTProcessID | For PowerShell scripts, the Windows process ID (PID) for the PowerShell process. |
Task: Web Request
Variables set by Web Request Tasks.
| Variable | Description |
| WebRequest.RequestURL | The URL requested by the task, including query parameters. Secret values are masked. |
| WebRequest.StatusCode | The HTTP status code returned by the remote server. |
| WebRequest.ReasonPhrase | The HTTP reason phrase returned by the remote server (for example, "OK" or "Not Found"). |
| WebRequest.ResponseContentType | The media type of the response (for example, "application/json"). |
| WebRequest.AttemptCount | The number of times the request was sent, including retries. |
| WebRequest.ResponseFileName | The name of the file where the server response (file or page) was saved, if the save to file option was selected. |
| WebRequest.ResponseHeader.* | The value of each response header, if the option to store response headers was selected (for example, WebRequest.ResponseHeader.ETag). |
| WebRequest.Response.* | Values from a JSON or XML response, if the option to create variables from the response was selected. The variable name is the configured prefix (WebRequest.Response. by default) followed by the path of the value (for example, WebRequest.Response.data.items[0].id). |
Trigger: Computer Monitor
Variables set by Computer Monitor triggers
| Variable | Description |
| ComputerMonitor.ErrorMessage | The error message if the connection has failed. |
| ComputerMonitor.ConnectionStatusCode | The numeric error code if the connection has failed, or 0 if it succeeded. |
| ComputerMonitor.Action |
A string indicating whether the trigger is firing because the connection has been broken or because it has been restored:
|
| ComputerMonitor.FailureCount |
If ComputerMonitor.Action is ConnectionFailed, FailureCount indicates the number of consecutive unsuccessful responses that have been received since the last successful response. If ComputerMonitor.Action is ConnectionRestored, FailureCount indicates the number of consecutive unsuccessful responses that were received before the connection was restored. You can use this variable to escalate your responses. For example, you could configure your job to send a warning message to certain users after the connection has been down for 5 minutes, and send a more urgent message if the connection is still down after 20 minutes. |
| ComputerMonitor.Target | The target that the trigger is trying to connect to. |
| ComputerMonitor.LastSuccessTime | The date/time of the last successful connection, in UTC |
Trigger: File
Variables set by File Triggers
| Variable | Description |
| FileTrigger.FileName | The name of the file(s) that matched the selection criteria. If the trigger is configured to list all matching files, and not configured to trigger separately for each file, the FileName variable will contain a list of all matching files, separated by semicolons. |
| FileTrigger.FileSize | The size of the file. |
| FileTrigger.FileCreationTime | The file's creation timestamp, in UTC. |
| FileTrigger.FileLastAccessTime | The file's last access timestamp, in UTC. |
| FileTrigger.FileLastWriteTime | The file's last write timestamp, in UTC. |
| FileTrigger.FileAttributes | The file's file attributes |
| FileTrigger.FileAction | The reason the file was selected: FileCreated, FileDeleted, FileExists, FileModified, or FileNoExist. |
Trigger: Process
Variables set by Process Triggers
| Variable | Description |
| ProcessTrigger.ProcessName | The name of the process |
| ProcessTrigger.ProcessID | The Windows process ID for the process |
| ProcessTrigger.ProcessEvent | The action that caused the trigger: "TriggerProcessStarted", "TriggerProcessEnded", "TriggerProcessMemExceeds" |
| ProcessTrigger.ProcessEventDescription | Description of the action that caused the trigger: "started", "ended", or "exceeded memory threshold" |
Trigger: Event Log
Variables set by Event Log Triggers
| Variable | Description |
| EventLogMonitor.EventLog | The name of the log where the event was reported. |
| EventLogMonitor.EventSource | The source of the event. |
| EventLogMonitor.EventCategory | The event category. |
| EventLogMonitor.EventCategoryName | The text description of the event category. |
| EventLogMonitor.EventType | The type/severity of the event. |
| EventLogMonitor.EventTypeName | The text description of the type/severity of the event. |
| EventLogMonitor.EventTimestamp | The timestamp of the event. |
| EventLogMonitor.EventID | The event ID. |
| EventLogMonitor.EventMessage | The message logged for the event. |
| EventLogMonitor.EventKeywords | Comma-delimited list of keywords for the event. |
Trigger: E-Mail
Variables set by E-Mail Triggers
| Variable | Description |
| EmailProcessing.SelectedMessageCount | The number of messages selected by the message filter |
| EmailProcessing.MessageId | The message ID of the selected e-mail message. Set only if the trigger is configured to trigger separately for each message. |
| EmailProcessing.MessageSubject | The subject of the selected e-mail message. Set only if the trigger is configured to trigger separately for each message. |
| EmailProcessing.MessageLocation |
The name(s) of the folders where the e-mail messages have been saved, if message saving is selected for the trigger. If multiple messages are selected, EmailProcessing.MessageLocation will contain multiple values, separated by semicolons. Each message is saved in a uniquely-named folder. |
Alert Notification
Variables that are available in alert notification subjects and messages
| Variable | Description |
| computername | The name of the computer issuing the alert |
| adTempus.InstanceName | The adTempus instance name. |
| adTempus.ServerAndInstanceName | The name of the server and instance, e.g., "computername\instancename". If this is the default instance, will be only "computername". |
| message | The alert message text |
| messageclass | The alert class (category) |
| messageid | The alert message ID |
| messagetype | The alert severity |
| messagecode | The message resource ID string |
| timestamp | The message timestamp |
| jobname | The name of the job associated with the alert |