AUTOSYS Box Job Command Job Example

AUTOSYS Box Job Command Job Example

AUTOSYS box is a group of jobs where many parameters are common between them by means of organizing jobs in group. For example if you have jobs where schedule start time, permissions, running times, run conditions are same then you could put all these jobs inside box to organize it better.

Condition for box command:

  • All jobs in box starts if box itself is running.
  • Jobs runs only once when box job executes.
  • Condition: Box remains in running state as long as any job in the box is running and box can not be complete until job are running.
  • If you change state of a box to INACTIVE (using sendevent command from command prompt) then it will change state of all jobs in that box to INACTIVE state.
  • Box job will run indefinitely until it reaches the status of FAILURE OR SUCCESS.
  • Box job will return FAILURE status if all jobs in that box have been ran and the status of one or more of jobs is in FAILURE state.
  • Box job will return SUCCESS status if all jobs in that box have been ran and the status of one or more of jobs is in SUCCESS state.

Below is sample Box job and one command job which is inside box job for start and stop job:

insert_job: JAVAHONK_StartDailyJobs_Box job_type: b
owner: JavaHonk
permission: mx,me
description: "JAVAHONK box to start the application"
date_conditions: 1
days_of_week: mo,tu,we,th,fr
exclude_calendar: CORP_CHRISTMAS_NEWYRS_ONLY
term_run_time: 30
start_times: "6:00"
application: JAVAHONK

insert_job: JAVAHONK_start_c  job_type: c
owner: JavaHonk
machine: JavaHonk.com
box_name: JAVAHONK_StartDailyJobs_Box
command: /apps/java/uat/JAVAHONK/java-JAVAHONK-uat/JAVAHONK/scripts/run-script.sh UAT start
permission: gx,ge
description: "Start JAVAHONK Application"
alarm_if_fail: 1
std_out_file: /opt/JavaHonk/autosyslogs/JAVAHONK_start_c.out
std_err_file: /opt/JavaHonk/autosyslogs/JAVAHONK_start_c.err
application: JAVAHONK

/********************************************************/

insert_job: JAVAHONK_StopDailyJobs_Box job_type: b
owner: JavaHonk
permission: mx,me
description: "JAVAHONK box to stop the application"
date_conditions: 1
days_of_week: mo,tu,we,th,fr
exclude_calendar: CORP_CHRISTMAS_NEWYRS_ONLY
term_run_time: 30
start_times: "20:00"
application: JAVAHONK

insert_job: JAVAHONK_stop_c  job_type: c
owner: JavaHonk
machine: JavaHonk.com
box_name: JAVAHONK_StopDailyJobs_Box
command: /apps/java/uat/JAVAHONK/java-JAVAHONK-uat/JAVAHONK/scripts/run-script.sh UAT stop
permission: gx,ge
description: "Stop JAVAHONK Application"
alarm_if_fail: 1
std_out_file: /opt/JavaHonk/autosyslogs/JAVAHONK_stop_c.out
std_err_file: /opt/JavaHonk/autosyslogs/JAVAHONK_stop_c.err
application: JAVAHONK

Reference:

Leave a Reply

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