Scheduler Commands

This page includes the following:

add_scheduler()

Add a scheduler with a single connection.

Parameters:

  • name - name for the new scheduler in AAI

  • archive_dir (optional, AutoSys only) - path to archive files on the server

    Default: None

  • dbms (optional) - one of SQL Server, Sybase, Oracle, or MySQL

    Default: SQLServer

  • host (optional) - host name or ip address of the AutoSys/CA7 database server

    Default: 'localhost'

  • port (optional) - port to connect to the AutoSys/CA7 database (SQL Server: 1433, Sybase: 4100, Oracle: 1521, MySQL: 3306)

    Default: based on dbms

  • db_name(optional) - name of the database/device for AutoSys/CA7

    Default: 'AutoSys' or 'CA7' or 'Tidal' or 'ControlM' or 'IWS'

  • user (optional) - for connecting to the AutoSys/CA7 database

    Default: 'jaws'

  • password (optional) - for connecting to the AutoSys/CA7database

    Default: 'jaws'

  • scheduler_type (optional) - the type of scheduler being added.

    Allowed values: AUTOSYS, TIDAL, TIDAL53, CA7

    Default: SchedulerType.AUTOSYS, SchedulerType.CA7, SchedulerType.TIDAL, SchedulerType.TIDAL53, or SchedulerType.IWS

  • trigger_DSN (optional, CA7 only) - fully qualified name of the dataset that triggers the EVENT JCL job on the mainframe

    Default: None

  • report_base_DSN (optional, CA7 only) - qualifier for the CA7 definition files that are created and maintained by the JOBDEF JCL job

    Default: None

  • archive_pattern (optional, AutoSys only) - date format for archive file names

    Default: 'MM.dd.yyyy'

  • archive_delimiter (optional, AutoSys only) - delimiter for fields in archive files, for AutoSys R11 (and later)

    Default: None

  • kerberized_conn (optional, AutoSys only) - connect to AutoSys Scheduler Sybase or Oracle Database using a Kerberized connection

    Default: False

  • kerberized_conn_principal (optional, AutoSys only) - service principal of the AutoSys Scheduler Database

    Sybase: Service principal

    Oracle: Service principal for keytab authentication; none for ticket cache authentication.

    Default: None

  • timeout (optional) - jdbc socket/read timeout in minutes

    Default: '0'

  • custom_connection_url (optional) - use a custom database connection url string

    Default: False - if custom_connection_url_string is NOT supplied, True - if custom_connection_url_string IS supplied

  • custom_connection_url_string (optional) - custom database connection url string

    Default: None

  • connector_url (IWS only) - IWS connector URL

    Default: None

  • api_url (IWS only) - IWS API URL

    Default: None

  • api_user (IWS only) - for connecting to the IWS API URL

    Default: None

  • api_password (IWS only) - for connecting to the IWS API URL

    Default: None

  • start_time (optional,IWS only) - Start time of day

    Default: None

    Example: TimeOfDay.valueOf("01:00:00")

Dependencies:

  • Must be logged in as admin

Result:

  • New scheduler created with specified parameters

Example add_scheduler() command line usage:

>>> add_scheduler(name='ENGAUTOSYSR11-03-2',
    archive_dir='/home/rhirsch/archives/', dbms='Oracle',
    host='ENGORA-01', port=1521, db_name='orcl3', user='mdbadmin',
    password='mdbadmin', scheduler_type=SchedulerType.AUTOSYS,
    archive_pattern='Mm.Dd.yyyy', archive_delimiter=',',
    kerberized_conn=False, kerberized_conn_principal=None)
add scheduler "ENGAUTOSYSR11-03-2"
done
 
>>> add_scheduler(name='tidal53', dbms='SQL Server',
    host='engmss-01', db_name='AdmiralTidal5-01', user='tidal',
    password='tidal97', scheduler_type=SchedulerType.TIDAL53)
>>> add_scheduler(name='CLI - API - cm03',
    host='http://engtidalcm-03:8080/api/ENGtes-6.0',
    user='stirlingsystems\jawsdemo', password='6RTyd3V8',
    scheduler_type=SchedulerType.TIDAL)
>>> add_scheduler(name='CA7 - GHALL', scheduler_type=CA7,
    host='192.168.1.242', port=21, user='ADCDMST', password='ABCDEF3',
    trigger_DSN='ADCDMST.TRIGGERS.GHALL', report_base_DSN='ADCDMST.GHALL')
>>> add_scheduler(name='advancedDbParameters', dmbs='SQL Server',
    user='autosys', password='autosys', timeout='20',
    custom_connection_url_string='jdbc:jtds:sqlserver://eng:1433/autosys')
>>> add_scheduler(name='Kerberized AutoSys - Keytab',
        dbms='Oracle',
        host='autosys.my.com', port=1521, db_name='ORCLPDB1',
        user=None,
        password='autosys.keytab',
        scheduler_type=SchedulerType.AUTOSYS,
        kerberized_conn=True,
        kerberized_conn_principal='autosys')
>>> add_scheduler(name='Kerberized AutoSys - TicketCache,
        dbms='Oracle',
        host='autosys.my.com', port=1521, db_name='ORCLPDB1',
        user=None,
        password='autosys_krb5cc',
        scheduler_type=SchedulerType.AUTOSYS,
        kerberized_conn=True,
        kerberized_conn_principal=None)

Example add_scheduler() script usage:

import sys
from jaws import *

login()
print 'begin'
try:
    add_scheduler(name='ENGAUTOSYSR11-03-2',
      archive_dir='/home/aai/archives/', dbms='Oracle',
      host='ENGORA-01', port=1521, db_name='orcl3', user='mdbadmin',
      password='mdbadmin', scheduler_type=SchedulerType.AUTOSYS,
      archive_pattern='Mm.Dd.yyyy', archive_delimiter=',')

    print 'end'

finally:
    logout()

Add AutoSys scheduler with kerberized Oracle authentication

  • With keytab file and principal

    login()
    add_scheduler(name='Kerberized AutoSys - Keytab',
        dbms='Oracle',
        host='10.253.153.33', port=1521, db_name='ORCLPDB1',
        user=None,
        password='/opt/aedbadmin/aedbadmin.keytab',
        scheduler_type=SchedulerType.AUTOSYS,
        kerberized_conn=True,
        kerberized_conn_principal='aedbadmin')
  • With cache credential file

    login()
    add_scheduler(name='Kerberized AutoSys - Ticket',
        dbms='Oracle',
        host='10.253.153.33', port=1521, db_name='ORCLPDB1',
        user=None,
        password='/opt/aedbadmin/krb5cc',
        scheduler_type=SchedulerType.AUTOSYS,
        kerberized_conn=True,
        kerberized_conn_principal=None)

delete_scheduler()

Delete a scheduler and all its jobstreams from the Automic Automation Intelligence database.

Parameters:

  • name - name of the scheduler to delete

Dependencies:

  • Must be logged in as admin

Result:

  • Given scheduler and all its jobstreams are deleted

Example delete_scheduler() command line usage:

>>> delete_scheduler(name='tidal53')
delete scheduler "tidal53"
done

>>> delete_scheduler('tidal53')

Example delete_scheduler() script usage:

import sys
from jaws import *

login()
print 'begin'
try:
    scheds = schedulers()
    for s in scheds:
      delete_scheduler(s)

    print 'end'

finally:
    logout()

Delete AutoSys scheduler with kerberized Oracle authentication

login()
    delete_scheduler('Kerberized AutoSys - Keytab')
    logout()
    exit()

download_scheduler()

Download a scheduler to update its job definitions.

Parameters:

  • schedulerName - name of the scheduler to download

Dependencies:

  • Must be logged in as admin

Result:

  • No return value. Specified scheduler is downloaded

Example download_scheduler() command line usage:

>>> download_scheduler(schedulerName='tidal53')
download scheduler "tidal53"
done

>>> download_scheduler('tidal53')"

Example download_scheduler() script usage:

import sys
from jaws import *

login()
print 'begin'
try:
    scheds = schedulers()
    for s in scheds:
      download_scheduler(s)

    print 'end'

finally:
    logout()

scheduler_impl()

Get the Java object representing the scheduler with the given name.

Parameters:

  • name - name of the scheduler to retrieve

Dependencies:

  • Must be logged in

Result:

  • Returns a SchedulerLite Java object representing scheduler, see SchedulerLite

Example scheduler_impl() command line usage:

>>> scheduler_impl(name='ENGAUTOSYS45-01')
SchedulerLite[ENGAUTOSYS45-01]

>>> scheduler_impl('ENGAUTOSYS45-01')

Example scheduler_impl() script usage:

import sys
from jaws import *

login()
print 'begin output'
try:
    scheds = schedulers()
    for s in scheds:
      print s + ": " + str(scheduler_impl(s))

    print 'end output'

finally:
    logout()

scheduler_impl_detail()

Get the Java object containing additional information for the scheduler with the given name. This object is only available to users who have "edit" access to the scheduler in question.

Parameters:

  • name - name of the scheduler to retrieve

Dependencies:

  • Must be logged in
  • Must have "edit" access to given scheduler

Result:

  • Returns a SchedulerDetail Java object containing scheduler info, see SchedulerDetail

Example scheduler_impl_detail() command line usage:

>>> scheduler_impl_detail(name='ENGAUTOSYS45-01')
com.termalabs.dto.scheduler.SchedulerDetail@487584a1

>>> scheduler_impl_detail('ENGAUTOSYS45-01')

Example scheduler_impl_detail() script usage:

import sys
from jaws import *

login()
print 'begin output'
try:
    scheds = schedulers()
    for s in scheds:
      print s + ": " + str(scheduler_impl_detail(s))

    print 'end output'

finally:
    logout()

schedulers()

Get a list of the names of the schedulers in the Automic Automation Intelligence database.

Parameters:

  • None

Dependencies:

  • Must be logged in

Result:

  • A list of the schedulers in the Automic Automation Intelligence database

Example schedulers() command line usage:

>>> schedulers()
[u'tidal53', u'autosys45', u'autosysR11-01', u'autosysR11-02']

Example schedulers() script usage:

import sys
from jaws import *

login()
print 'begin output'
try:
    scheds = schedulers()
    for s in scheds:
      print s

    print 'end output'

finally:
    logout()

update_scheduler_online()

Update the on/offline status of a scheduler.

Parameters:

  • name - name of the scheduler to update
  • online - flag indicating whether scheduler is online (True) or offline (False)

Dependencies:

  • Must be logged in

Result:

  • Scheduler online status set as online or offline

Example update_scheduler_online() command line usage:

>>> update_scheduler_online(name='tidal53', online=True) 
updating scheduler "tidal53" online status to "1"

Example update_scheduler_online() script usage:

import sys
from jaws import *

login()
print 'begin'
try:
    scheds = schedulers()
    for s in scheds:
      update_scheduler_online(s, online=True)

    print 'end'

finally:
    logout()