This SQL script lists the names and addresses of all Notification Recipients used by Notification Actions in Responses defined for Jobs and Job Steps and for Notification Tasks within jobs.
//Connect to the local adTempus server, using Windows authentication. | |
using (var connection = Scheduler.Connect()) | |
{ | |
//Create a DataContext to work in. All object operations take place within this context. | |
//Use a Using block so the context is disposed when we finish with it | |
using (var context = connection.NewDataContext()) | |
{ | |
//Fetch the job named "My Test Job" | |
var job = context.GetJob("My Test Job"); | |
if (null == job) |
This PowerShell script uses the adTempus API to retrieve a Credential Profile and set a new password for it.
Usage:
.\set-adtcredentialpassword -account userid -newpassword password
This fragment demonstrates how to add a mapped network drive to a job
This code creates a NetworkConnection resource to map a drive letter to a UNC path for use within the job.
param ( | |
[string]$server = ".", | |
[string]$job = "*", | |
[datetime]$start=, | |
[datetime]$end, | |
[Parameter(Mandatory)] | |
[string]$output | |
) | |
add-type -path "c:\program files\arcana development\adtempus\4.0\ArcanaDevelopment.adTempus.Client.dll" |
This sample demonstrates how to use the adTempus API from Python.
The adTempus API is only available as a .NET assembly, but can be referenced from Python by using Python.NET.
Refer to the Python.NET documentation for installation instructions. Once Python.NET is installed, your Python code can reference the adTempus client assembly as shown below.
This script demonstrates how to retrieve a Holiday Set and get a list of the holiday dates that it defines
This sample demonstrates how to delete a job through the API.
If you attempt to delete a job that has running instances, you will get an exception. Before deleting a job you should terminate all running instances, as shown below.
This example demonstrates how to submit a job for execution and then wait until execution has completed.
The Execute method returns a collection of all the instances created for the execution request (there may be more than one instance if the job runs in a queue that targets multiple agents). To wait for completion, you must periodically refresh the status of each of these instances until all have finished running.
This SQL script grants access to the adTempus database for the machine where adTempus is running, allowing adTempus to connect to the database while running under the Local System account.