CA Workload Automation - Autosys

Introduction

 
This article is more theoretical, to get the basics of a job system which will help to schedule a job in Autosys. I had an opportunity to schedule one of the executable applications in Autosys, so I am sharing knowledge based on an experience I had with the Autosys job scheduling tool. Let’s jump into the article.
 

What is AUTOSYS?

 
Autosys is a multi-platform automated job management system which provides scheduling monitoring and reporting of Autosys jobs.
 
It performs different kind of tasks automatically with human intervention. There are different tasks like, transferring a file on a frequent time interval basis, sending mail with reports, loading the data from one source to other etc.. Every task can be automated by scheduling the batch file/exe in Autosys.
 
Autosys is CA Workload automation product.
 

JOB

 
Any task to be performed in Autosys is called a Job. A Job can be any single command, exe file, windows batch file or script. Job definition will have qualifying attributes like, where the job is, at what time and on which day it should run, etc. A job with a set of attributes defined for a job to run is known as Job Information Language (JIL).
 
There are two ways to define / insert a job in Autosys,
  1. Using the Graphical User Interface (GUI)
  2. Using the Job Information Language (JIL)
JOB Type
 
A classification of Autosys job types are below,
  • Command Job
    A command job runs executable, windows batch, scripts (Unix, PowerShell..)

  • File watcher Job
    A file watcher job will monitor arrival of file into the system

  • Box Job
    A box job will have  a set of jobs used to control and organize process flow. An excellent feature here is that a box  can include other boxes.
 
In the above case a box will have 4 jobs defined with a process flow. It might be like this, to utilize the box in box feature, by merging the file & validation with result cases in one job and other jobs for file backup in either case.
 

JIL in Autosys

 
JIL is a specification language with its own syntax which will describe how, when and where the job should run. JIL command can be entered in JIL command prompt. As an alternate, we can provide JIL command in text file as well and redirect to JIL command – language processor will interpret the information in the text file and load this information in the database.
 
JOB Status
 
 
Above job statuses are self-descriptive with the name itself. The highlight part of it, is below.
  • Success – The job execution was successful with exit code “0”. In the case of a box, all jobs are successful when box is set to success state.
  • Failure: The job failed, with exit code > 0
  • Force Start – To run the job which is not in schedule, we are forcing the start state event.
  • On Hold & Off Hold – The job set to on hold will not run until it receives an off hold event.
  • On Ice & Off Ice - The job set to on ice will not run until it receives off ice event.
From the above definitions there might be a confusion on “On Hold & off Hold” & “On Ice & Off Ice” both do the same process.
 
Differences between “On Hold & Off Hold” & “On Ice & Off Ice”
  • Job with On Hold is set to Off Hold – it runs the job
  • Job with On Ice is set to Off Ice – It will not run the job, we have to force start to run.
  • Job set to on Hold – dependent job will not run whereas with on ice – dependent job will run as defined schedule.
Create Job
 
Below is the JIL command to insert job. By using Import JIL option in Autosys web interface this can be created.
 
 
Update Job
 
Below is the JIL to update job, it should run every 15 minutes. This can be set to custom times along with days_of_week & start times attributes. Ex: Every Tuesday the job should run at 13.30.
 
 
Delete Job
 
Replace update_job with delete_job followed with job name to delete a job in Autosys. 
 
References
 
autosys-tutorials.blogspot.com