adTempus user script samples

This page lists sample scripts for use with the adTempus user scripting system. These are scripts used within adTempus to augment or control job execution.

For programmatic access to adTempus (creation and modification of jobs, etc.), see the client API instead.

Most samples are given in both C# and VB.NET. If a sample is given in only one language and you need the other, there are many free code converters available, such as this one from Telerik.

Name Description Languages
Acknowledge all failed instances of a job when the job succeeds

This script acknowledges all failed instances for the executing job. It can be used to automatically acknowledge previous failures for the job when the job succeeds

C#
Delay execution by x seconds

This script can be run to add a delay between job steps, response actions, etc.

C#, VB.NET
Include warning and error messages from Job Log in notification messages

This script allows you to include warning and error messages logged in the Job Log when sending a notification message for the job. For example, if you have a Response to send a notification when the job fails, you can use this script to include more detailed information from the Job Log.

C#
Send a notification message when held jobs are found

This script can be used to send a notification message when jobs are found that have been put on hold.

C#
Set a job variable to the last business day of the prior month

This script can be run by an adTempus script task to set a Job Variable to the last business day of the month prior to when the script is run.

C#
Set Job Variables from values in a trigger file

This script can be used if you want to trigger a job using a file and set Job Variables from values in the file.

C#
Use API to get information on current job instance

This script uses the adTempus API to get an ExecutionHistoryItem representing the job instance in which the script is running. You can use this to get detailed information about the instance and its steps. In this example the script logs messages giving the status for each step that has executed so far.

C#