Language: Python
View on GitHub to download or comment.
See the Client API Examples Introduction for additional information and prerequisites.
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.
import clr
#Add a reference to the adTempus client assembly and import its types
clr.AddReference("C:\\Program Files\\Arcana Development\\adTempus\\4.0\\ArcanaDevelopment.adTempus.Client.dll")
from ArcanaDevelopment.adTempus.Client import *
from ArcanaDevelopment.adTempus.Shared import *
#create a connection to adTempus on the local server
serverName="."
connection = Scheduler.Connect(serverName, LoginAuthenticationType.Windows, "", "")
print("Successful connection to adTempus on " + connection.HostComputer + ", running version " + connection.ServerVersion.ToString())
#start a new context
context=connection.NewDataContext()
#fetch all jobs and list their names
jobs=context.GetJobs("*")
for job in jobs:
print(job.FullyQualifiedName)
View on GitHub to comment.