Tuesday, May 22, 2007

Running Autosys Job on Success of Other

/* ----------------- PREFIX_TEST_SUCCESS_CON_DEV ------------ */
update_job: PREFIX_TEST_SUCCESS_CON_DEV job_type: c
command: ls -l
machine: IN01
permission: gx,mx,me
date_conditions: 1
days_of_week: su,mo,tu,we,th,fr,sa
run_window: "11:00-12:30"
start_times: "11:25"
std_out_file: /home/autosys/logs/output/$AUTO_JOB_NAME.`date "+%m%d"`.out
std_err_file: /home/autosys/logs/error/$AUTO_JOB_NAME.`date "+%m%d"`.err
alarm_if_fail: 1
profile: /home/autosys/profile/autoprofile

/* ----------------- PREFIX_TEST_SUCCESS_DEP_DEV ------------ */
insert_job: PREFIX_TEST_SUCCESS_DEP_DEV job_type: c
command: ls -l
machine: IN01
permission: gx,mx,me
date_conditions: 1
days_of_week: su,mo,tu,we,th,fr,sa
run_window: "11:00-12:30"
start_times: "11:22"
condition: success(PREFIX_TEST_SUCCESS_CON_DEV)std_out_file: /home/autosys/logs/output/$AUTO_JOB_NAME.`date "+%m%d"`.out
std_err_file: /home/autosys/logs/error/$AUTO_JOB_NAME.`date "+%m%d"`.err
alarm_if_fail: 1
profile: /home/autosys/profile/autoprofile

The second job will run only after the successfull completion of the first job. Starting 11:22 second job will monitor first job for success status.

Monday, May 21, 2007

Autosys Auto Restart on Failure

insert_job: PREFIX_TEST_AUTOSYS_DEV job_type: c
owner: dev@IN01
command: abcd
machine: IN01
permission: gx,mx,me
date_conditions: 1
days_of_week: su,mo,tu,we,th,fr,sa
n_retrys: 3
start_times: "10:32"
run_window: "00:00-10:35"
description: "This job is written to test n_retrys clause supported by autosys"
std_out_file: /home/autosys/logs/$AUTO_JOB_NAME.`date "+%m%d"`.out
std_err_file: /home/autosys/logs/$AUTO_JOB_NAME.`date "+%m%d"`.err
alarm_if_fail: 1
profile: /home/autosys/profile/autoprofile

This definition generates an autosys job which restarts itself 3 times in case of failure. If it succeeds it won't restart itself. If it fails and run window expires it still wont restart.