AUTOSYS Include multiple command Job Inside Box Job

AUTOSYS Include multiple command Job Inside Box Job

AUTOSYS box job is very useful to put many command job inside it and control all job which is inside it. In this tutorial you will see how to include command job inside box job. I will create one box job and will include two command job inside it.

  • First create box job as an example below:
insert_job: JavaHonk_Box job_type: b
owner: javahonk(This should be owner of the folder with proper prmission)
permission: mx,me
description: "JavaHonk box to start in PROD"
date_conditions: 1
days_of_week: mo,tu,we,th,fr
exclude_calendar: CORP_CHRISTMAS_NEWYRS_ONLY
alarm_if_fail: 0
term_run_time: 30
start_times: "18:05"
alarm_if_fail: 0
group: JAVAHONK_UAT (This controls who can execute the job)
application: 1ABC (AUTOSYS also gets control using application which is nothing but group)
  • Now create sample two command jobs:
  • This job inherit run time from box job and will start at 18:05 pm:
insert_job: JavaHonk_start_c  job_type: c
owner: javahonk
machine: javahonk.com
box_name: JavaHonk_Box
command: /apps/javahonk/scripts/run-script.sh PROD start
permission: gx,ge
description: "Start JavaHonk Application"
alarm_if_fail: 0
std_out_file: /apps/javahonk/JavaHonk_start_c.out
std_err_file: /apps/javahonk/JavaHonk_start_c.err
group: JAVAHONK_UAT
application: 1ABC
  • This command job is inside box but it using it own time which will start at: 18:10 pm.

Note: Box job term_run_time is very important and we kept it for 30 min so it will run for 30 min. Both job should be completed by that time, otherwise it will be terminated by them-self:

insert_job: Javahonk_stop_c  job_type: c
owner: javahonk
machine: javahonk.com
box_name: JavaHonk_Box
command: /apps/javahonk/scripts/run-script.sh PROD stop
permission: gx,ge
date_conditions: 1
days_of_week: mo,tu,we,th,fr
exclude_calendar: CORP_CHRISTMAS_NEWYRS_ONLY
description: "Stop JavaHonk  Application"
alarm_if_fail: 0
start_times: "18:10"
std_out_file: /apps/javahonk/JavaHonk_stop_c.out
std_err_file: /apps/javahonk/JavaHonk_stop_c.err
group: JAVAHONK_UAT
application: 1ABC

Leave a Reply

Your email address will not be published. Required fields are marked *