AutoSys - A Job Scheduling tool

AutoSys is an automated job control system for scheduling, monitoring, and reporting. These jobs can reside on any AutoSys-configured machine that is attached to a network.
Converting cron to JIL (UNIX Only) => cron2jil
The gadget spec URL could not be found
There are the two methods you can use to create job definitions:
  1. Using the AutoSys Graphical User Interface (GUI).
  2. Using the AutoSys Job Information Language (JIL) through a command-line interface.
The gadget spec URL could not be found
Using JIL to create AutoSys Job

insert_job: DBStatus_prod_rat1_c job_type: c
command: /DBA/scripts/Autosys/dbmonitor.sh
machine: rat1-prod
owner: admin@prod-rat1
permission: gx,wx,mx,me
days_of_week: all
start_times: "04:00,08:00, 12:00, 16:00, 20:00, 24:00"
description: "Jobs to monitor if database is up and accepting connections"
alarm_if_fail: 1
max_exit_success: 1

Lets explain highlighted words,

insert_job => Name used to identify a job (JIL Keyword)

job_type   => Type of Job (valid types are c => command, f  => file watcher b => box)

===================================================================================================
Command Jobs: Can be a shell script or an executable program.
Box Jobs: is a container of other jobs. And is used to organize and control process flow. If no other starting conditions are specified at the job level, a job within a box will run as soon as the starting conditions for the box are satisfied. If several jobs in a box do not have job-level starting conditions, they will all run in parallel.
File watcher: starts a process that monitors for the existence and size of a specific operating system file. When that file reaches a certain minimum size, and is no longer growing in size, the File Watcher Job completes successfully, indicating that the file has arrived.
===================================================================================================
The gadget spec URL could not be found
command => The command attribute can be the name of any command, executable, UNIX shell script or batch file, and its arguments.

machine   => This attribute specifies the client machine on which the command should be run.

owner       => The job owner specifies whose user ID the command will be run under on the client machine. This attribute is
                      automatically set to the user who invoked jil or the GUI to define the job, and cannot be changed except by the
                      edit superuser.

permission => The first letter
of gx,wx,mx,me refers to Group users,  any user (world) , autorized user regardless of what machine they
                       are on. By default when m is not used, the user must be on the machine specified in the owner field of the job. The
                       Second letter
of the permission, x and e refer to the rights to execute and edit, respectively. Execute here essentially
                       means change the status of the job - start, force start, put on ice, kill, delete, etc.

                      For example, giving the job gx,wx,ge means that anyone on that machine may change the status of the job, but only users
                      in the same group as the owner may edit it.
The gadget spec URL could not be found
days_of_week => The days of the week attribute specifies the days on which the job should be run.

start_times  => When the job will start
Once jil is created we need to add this job in autosys database : To add this jil (DBStatus_prod_rat1_c we have created earlier) to autosys database,

$jil < DBStatus_prod_rat1_c

This command will add “DBStatus_prod_rat1_c” job to autosys databse.

Now we need to send events to start the job


sendevent –E FORCE_STARTJOB -J DBStatus_prod_rat1_c
sendevent -E STARTJOB -J DBStatus_prod_rat1_c


To put jobs on OFF ICE or ON ICE
The gadget spec URL could not be found

sendevent -E OFF_ICE -J DBStatus_prod_rat1_c
sendevent -E ON_ICE -J DBStatus_prod_rat1_c
sendevent -E KILLJOB –J "DBStatus_prod_rat1_c"

Job States and Status :

AutoSys keeps track of the current state, or status, of every job. The value of a job’s status is used to determine when to start other jobs that are dependent on the job. The job status is displayed in the job report generated by the autorep command, and in the job report you can view in the Job Activity Console.

autorep command

Syntax : autorep -J job_name [ -d | -q | - r run_number ]

Description : autorep lists a variety of information about jobs

Options :

-J job_name : Indicates that a Job Report is desired. To report on all jobs, specify ALL. The % character may be used in the job name as
a wildcard

-d Indicates a Detail Report is desired. For a Job Report, all events from the last run of the requested job will be listed.

-q Indicates a Query Report is desired, providing the current job or machine definition, in JIL format, as it exists in the AutoSys database.

-r run_num Indicates a report is desired for a specific job run (run_num). This option can only be used with the -s and -d options. If this option is omitted, or run_num is zero, the most current job run is reported. A minus sign (-) can be used before the run_num value to indicate a relative counter for a past job run, relative to the current run number. For example, the option r -2 would generate a report for the job run two runs back.

Meaning of AutoSys status
STATUS AUTO STATUS Meaning
RU RUNNING Running
ST STARTING Starting
SU SUCCESS Success
FA FAILURE Failure
TE TERMINATED Terminated
OI ON_ICE On Ice
IN INACTIVE Inactive
AC ACTIVATED Activated
RE RESTART Restart
OH ON_HOLD On Hold
QW QUE_WAIT Queue Wait
RD Refresh Dependencies
RF Refresh Filewatcher

The gadget spec URL could not be found

================================================================================================

================================================================================================
The gadget spec URL could not be found

The gadget spec URL could not be found

The gadget spec URL could not be found


The gadget spec URL could not be found
Comments