Sample JIL Code and Details:
insert_job: AUTOSYS_INFO_SAMPLE_JOB job_type: c
box_name: AUTOSYS_INFO_SAMPLE_BOX
command: ls -l
machine: localhost
owner: AUTOSYS_INFO
permission: gx,ge,wx,we,mx,me
date_conditions: 1
days_of_week: all
start_times: “15:00, 14:00″
run_window: “14:00 - 6:00″
condition: s (AUTOSYS_INFO_SAMPLE_JOB_2)
description: “description field”
n_retrys: 12
term_run_time: 60
box_terminator: 1
job_terminator: 1
std_out_file: /tmp/std_out
std_err_file: /tmp/std_err
min_run_alarm: 5
max_run_alarm: 30
alarm_if_fail: 1
profile: /tmp/.profile
box_name: AUTOSYS_INFO_SAMPLE_BOX
command: ls -l
machine: localhost
owner: AUTOSYS_INFO
permission: gx,ge,wx,we,mx,me
date_conditions: 1
days_of_week: all
start_times: “15:00, 14:00″
run_window: “14:00 - 6:00″
condition: s (AUTOSYS_INFO_SAMPLE_JOB_2)
description: “description field”
n_retrys: 12
term_run_time: 60
box_terminator: 1
job_terminator: 1
std_out_file: /tmp/std_out
std_err_file: /tmp/std_err
min_run_alarm: 5
max_run_alarm: 30
alarm_if_fail: 1
profile: /tmp/.profile
Explanation of each line:
Insert_job: this will let the autosys server to recognize the job and inserts into autosys DataBase.
Jobtype: there are two types of jobs namely box and child ( c=child, B=box)
box_name: this is the box job name: box job can have more than 1 child jobs. (this is just like grouping the jobs).
commands: this is where you tell Autosys, what to do when the job runs. ( you’ll give reference to your scripts here).
machine: name of the machine where you want to run the job.
owner: owner of the job (Application name)
permissions – read, write, execute
date_conditions: 1 if you have any specifications.
days_of_week: on which days of the week you want the job to run ("All" it will run from SUN to SAT, or you have option to specify the days : mo, tu, we, th, fr)
start_time: the time at which the job should kick-off/start
run_window: this option is for monitoring jobs. the job will run continously for the specified time window.
conditions: here you can specify the dependencies. like success of some other job.
description: Job details as in what the job is designed for.
n_retrys: no of retrys on a failure.
term_run_job: the job will terminate if it runs for specified time.
box_terminator: if 1, terminates box job depends on term_run_time.
job_terminator: if 1, terminates child job depends on term_run_time.
std_out_file: standard output file (log) for the job
std_err_file: Error log file if the job fails
min_run_alarm: if the job terminates/completed with in that time it generate an alarm
max_run_alarm: if the job runs for more than the specified time, it generate an alarm
alarm_if_fail: generates an alarm if the job fails
profile: the file where you can keep all your variables
Note: We don’t use all the above options in all the jobs, it depends on the
requirements.
To
Insert a new JIL code:
➧If you are inserting the new JIL from command line, follow the below steps.
Create file with the help of "vi" or "cat" command.
Example: vi AUTOSYS_JIL.txt
Press "insert" and copy paste the JIL code (refer sample JIL code) and save the file
➧ On command line use below format:
$ jil < AUTOSYS_JIL.txt > AUTOSYS_JIL.log
Note: Above option will create the log file automatically and you can check your JIL status on the same file.
If Exit Code = 0 - Means JIL deployed successfully.
If Exit Code = 1 - Means there is some issue with provided information inside JIL file
➧ To update the existing JIL:
On command line issue command "jil"
$ jil
$ update_job: AUTOSYS_INFO_SAMPLE_JOB
$ n_retrys: 0
Note: Press "Enter" after the each step and to save and update and changes use "ctrl+D"
No comments:
Post a Comment