adTempus API sample code

This page lists sample code available for the adTempus Client API. See the Examples Introduction for more information and prerequisites.

For user scripts run within adTempus jobs, see the user script samples instead.

For PowerShell script examples, see the PowerShell scripts page.

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
Create a new login and assign it to the Administrators role

This sample demonstrates how to create a new adTempus login for a Windows user and assign it to a role (security group).

C#, VB.NET
Create a recurring schedule for a job

This sample uses the adTempus API to create a recurring schedule for a job.

C#, VB.NET
Create response to send notification email on job failure

This example uses the adTempus API to add a Notification Action to a job to send an email message when the job fails.

C#, VB.NET
Delete a job that may be running

This sample demonstrates how to delete a job through the API.

C#, VB.NET
Fetch recent job instances

These samples demonstrate how to retrieve recent job instances

C#
Find jobs that missed their scheduled executions because they were held

This script finds jobs that missed executions while they were held.

C#
Find overridden job variables

This script looks at all groups, jobs, and steps to find places where Job Variables defined at a higher level have been overridden.

C#
Get dates for a Holiday Set

This script demonstrates how to retrieve a Holiday Set and get a list of the holiday dates that it defines

C#
Get execution times for all jobs

This script retrieves scheduled execution times for all jobs on the server.

C#, VB.NET
Link jobs using a Job Trigger

This sample shows how to link two jobs using a Job Trigger.

C#
List Job Variables defined for all groups, jobs, and steps

This script creates a tab-delimited file listing the Job Variables defined for all groups, jobs, and steps.

C#, VB.NET
Map a drive letter to a UNC path for a job

This fragment demonstrates how to add a mapped network drive to a job

C#
Query the change log

The sample demonstrates how to query the adTempus Change Log (audit log) to report on tracked changes to adTempus configuration.

C#
Set Job Variables when submitting a job for execution

This sample demonstrates how to define or override Job Variables when submitting a job for execution. Variables are defined or set at runtime using the JobExecutionSettings.JobVariables collection.

C#, VB.NET
Submit a job for execution and wait for completion

This example demonstrates how to submit a job for execution and then wait until execution has completed.

C#, VB.NET
Terminate all jobs

This example uses the adTempus API to terminate all running jobs on the server.

C#, VB.NET
Update subject and message for all Notification Actions

This script finds all Notification Actions that are run for a failed step and updates them with a new notification subject and message.

C#, VB.NET
Using the adTempus API from Python

This sample demonstrates how to use the adTempus API from Python.

Python