`

AutoSys的基本命令

 
阅读更多

1.cmd
sendevent -E FORCE_STARTJOB -J JobName
sendevent -E JOB_ON_ICE -J JobName
sendevent -E CHANGE_STATUS -s FAILURE -J JobName
sendevent -E CHANGE_STATUS -s SUCCESS -J JobName

2.run jil file to create/update/delete Job
jil < /path/JilFile.jil

3.Create calendar on Autosys
1).create TXT document first, the document content contains Calendar name,
  calendar mode is 'A'(the calendar mode contains 'add','delete','print') and calendar dates.
  4474_US_AfterCSSIHoliday
  A
  12/27/2011
  01/03/2012
  01/17/2012
  ........
2). autocal_asc < filename

4.create job scripts

/*  -----------------  Box_Name  -----------------  */ 
 
insert_job:  Box_Name    job_type:  b 
owner:  admin 
permission: 
date_conditions:  1 
days_of_week:  su,mo,tu,we,th 
start_times:  "20:00"
description:  "start XXX Box" 
alarm_if_fail:  1 

/*  -----------------  FW_Name  -----------------  */ 
 
insert_job:  FW_Name    job_type:  f 
box_name:  Box_Name 
machine:  watch_machine 
owner:  admin
permission: 
description:  "If delayed contact support team" 
watch_file:  /flag_path/flagfile.flag                                              
watch_file_min_size:  0 
watch_interval:  10 
max_run_alarm:  20 
alarm_if_fail:  1 
profile:  /path/Profile.sh   
 

/*  -----------------  Job_Name  -----------------  */ 
 
insert_job:  Job_Name    job_type:  c 
box_name:  Box_Name 
command:  /ksh_path/XXX.ksh
machine:  ksh_machine 
owner:  admin
permission: 
description:  "XXX processing" 
condition:  s(FW_Name)
std_out_file:  log_path/XXX.`date  +%Y%m%d%H%M%S`.log 
std_err_file:  log_path/XXX.`date  +%Y%m%d%H%M%S`.log 
max_run_alarm:  20 
alarm_if_fail:  1 
profile:  /path/Profile.sh


5.delete job scripts

delete_box: Box_Name
delete_job: Job_Name

 

6.update job scripts

/*  -----------------  Box_Name  -----------------  */ 
 
update_job:  Box_Name    job_type:  b 
owner:  admin 
permission: 
date_conditions:  1 
days_of_week:  su,mo,tu,we,th 
start_times:  "20:00"
description:  "start XXX Box" 
alarm_if_fail:  1 

/*  -----------------  FW_Name  -----------------  */ 
 
update_job:  FW_Name    job_type:  f 
box_name:  Box_Name 
machine:  watch_machine 
owner:  admin
permission: 
description:  "If delayed contact support team" 
watch_file:  /flag_path/flagfile.flag                                              
watch_file_min_size:  0 
watch_interval:  10 
max_run_alarm:  20 
alarm_if_fail:  1 
profile:  /path/Profile.sh   
 

/*  -----------------  Job_Name  -----------------  */ 
 
update_job:  Job_Name    job_type:  c 
box_name:  Box_Name 
command:  /ksh_path/XXX.ksh
machine:  ksh_machine 
owner:  admin
permission: 
description:  "XXX processing" 
condition:  s(FW_Name)
std_out_file:  log_path/XXX.`date  +%Y%m%d%H%M%S`.log 
std_err_file:  log_path/XXX.`date  +%Y%m%d%H%M%S`.log 
max_run_alarm:  20 
alarm_if_fail:  1 
profile:  /path/Profile.sh

 

 

7.Kill job

sendevent -E KILLJOB -J 163206_PNLDaily_LoadS2DailyFiles

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics