autosys 基本命令

来源:互联网 发布:手游源码出售 编辑:程序博客网 时间:2024/06/04 18:38
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_box: 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



http://www.myexception.cn/operating-system/667417.html




Example to change the box BOX_A start time to 15:00 from 14:00

update_job: BOX_Astart_times: "15:00"

Save this into a file and run it using jil < filename.jil



module load  dev--已设置好的开发环境

jil < run.jil --owner dev


sendevent -J jobname -E FORCE_STARTJOB  --owner dev



0 0
原创粉丝点击