Contents
AutoSys JIL Script Validation Command Line. Once you created new AutoSys JIL file its very important to validate if before the deployment. You can either use Web Interface or command line to validate. Here I will show you how to validate newly create JIL file on Unix: First see details about JIL file using below command: $ cat JavaHonk.jil. Calendartoday Updated On: Products. Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) CA Workload Automation Agent. Show More Show Less.
- 2 Ways to Create Jobs in AutoSys
AutoSys Job Scheduler
AutoSys is a job scheduler used for defining jobs, which helps in controlling and monitoring processes. The jobs can be created using batch programs or UNIX scripts.
Autosys Delete Calendar Jil
AutoSys jobs can set on a LINUX/ UNIX or a Window machine. For setting a job, you need access to AutoSys prompt. On a Windows machine, you can define the job in the command prompt, whereas, on a Linux machine you have to define a job using the terminal.
Ways to Create Jobs in AutoSys
To create a job in this job scheduler, you can either use Job Information Language (JIL), or the AutoSys graphical user interface (GUI).
Job Information Language (JIL)
JIL is the standard scripting language used for defining AutoSys job, like all programming languages, JIL also comes with some predefined keywords and attributes.
AutoSys GUI
The graphical user interface of GUI broadly consists of JIL subcommands and is built using JAVA.
The key thing while defining a job in AutoSys is that you need to figure out the conditions and then define the job using the subcommand and attributes, and once you are done, you need to schedule a time during which the job is going to get triggered. Once the process of defining a job is complete, make sure to check out the security parameters.
How to write an AutoSys Job?
AutoSys jobs can only be supported on a Windows or Linux computer. To define a job on a Windows or Linux machine, please follow the steps given below-
If you are using a Windows machine, then click on the Start button, then go “All Programs”, look for “CA Workload Automation” and then click on CA prompt window.
But if in case, you are using a Linux machine, then you can search of the “CA Prompt Window” using the finder.
Now, your task will be to get access to the JIL prompt, so once the prompt window pops up type “jil”.
Defining a Job in AutoSys
When a job is defined, certain boundaries are checked, the first and foremost are the syntax, if you use an incorrect syntax, your program is not going to run, the second thing is checking the conditions and then defining the attributes. And lastly, setting a schedule date or time for the job to get activated.
To issue a job using JIL, please follow the given procedure:-
- First, open an editor, for writing the JIL codes.
- Now specify the JIL subcommands:
- insert_job: job_name
- job_type: job_type
- machine: unixagent
- owner: [email protected]
- date_conditions: date/time
- command: bin/file_name.ext
Other commonly used AutoSys commands
- autorep – used for getting information of various elements like jobs, machines, variables, etc.
- chase – gives a detailed info about the conditions of various jobs
- autoping – checks whether the server and the client’s machine are connected or not.
- Autostatus –j job_name – lets users check the condition of a particular job.
- chk_auto_up – helps in getting information of the job to know whether it is getting the process or not from the database.
- sendevent – allows a user to directly initiate the status of the job in a client’s machine.
- jil –v syntax < file_name.ext – checks whether the syntax defined in the file are correct or not.
- Autosys_secure – helps in modifying certain key aspects of a database.
How did you like this Tutorial on AutoSys Job Scheduler? Please Share and let your friends know about it if you liked it.
AutoSys Log Files Location Example
Any job you create in Autosys should specify values for std_out_file and std_err_file because it is important in case if something goes wrong with AutoSys jobs. If you don’t specify then AutoSys job sends anything to standard out or standard error, then the output will go to /opt/CA/r11/agent/out/univagent.out. As this is default location and not preferable because the /opt/CA file system on most of our servers has only 1 GB of space. When it fills up every Autosys job will fail and you will not see anything. These files are owned by root, so you will not be able to delete them without administrator assistance.
If you do not want to see any output and your job is running on a Unix server then you can use /dev/null to have the output discarded.
To have unique file generated each time when you run your job, you can use the following variables:
value | Windows | Linux |
job name | %AUTO_JOB_NAME% | $AUTO_JOB_NAME |
instance id | %AUTORUN% | $AUTORUN |
Below are examples:
Linux:
- std_out_file: /opt/apps/dev/myTeam/log/$AUTO_JOB_NAME.$AUTORUN.stdout
- std_err_file: /opt/apps/dev/myTeam/log/$AUTO_JOB_NAME.$AUTORUN.stdout
Windows:
- std_out_file: D:optappsdevmyTeamlog%AUTO_JOB_NAME%.%AUTORUN%.stdout
- std_err_file: D:optappsdevmyTeamlog%AUTO_JOB_NAME%.%AUTORUN%.stdout
Sample JIL file with log files attached:
2 4 6 8 10 12 14 | owner:Javahonk@JavaHonk.com command:/apps/JavaHonk/DividendNotifier/scripts/run-script.sh UAT start date_conditions:1 exclude_calendar:CORP_CHRISTMAS_NEWYRS_ONLY condition:s(JavaHonk_GenProcessDiv_c) alarm_if_fail:1 std_out_file:/apps/JavaHonk/DividendNotifier/logs/$AUTO_JOB_NAME.$AUTORUN.stdout std_err_file:/apps/JavaHonk/DividendNotifier/logs/$AUTO_JOB_NAME.$AUTORUN_err.stdout |
- That’s it. For more details please refer CA documentation here