Schéma
Variables
$AUTOUSER/config.$AUTOSERV : fichier de configuration d'une instance
$AUTOUSER : répertoire contenant la configuration, les logs, archives …
$AUTOSERV : nom de l'instance associé au fichier de configuration
/etc/auto.profile : fichier de profile AutoSys
Commandes Autosys (sendevent, autorep, job_depends)
Lister les jobs autosys | autorep -w -J <job_name|ALL> |
Lancer un START sur un job | sendevent -E STARTJOB -J <job_name> |
Forcer le START sur un job | sendevent -E FORCE_STARTJOB -J <job_name> |
HOLDER un job | sendevent -E JOB_ON_HOLD -J <job_name> |
GELER un job | sendevent -E JOB_ON_ICE -J <job_name> |
Afficher les dépendance d'un job | job_depends -c -w -J <job_name> |
KILLER un job | sendevent -E KILLJOB -J <job_name> |
Retirer le HOLD sur un job | sendevent -E JOB_OFF_HOLD -J <job_name> |
Retirer le GEL d'un job | sendevent -E JOB_OFF_ICE -J <job_name> |
Passer un job en SUCCESS | sendevent -E CHANGE_STATUS -s SUCCESS -J <job_name> |
Passer un job en TERMINATED | sendevent -E CHANGE_STATUS -s TERMINATED -J <job_name> |
Afficher la définition d'un job | autorep -w -J <job_name> -q |
Afficher la date du prochain lancement d'un job | job_depends -t -J <job_name> -F "${date_start}" avec "date_start=<date du jour au format YYYY/mm/dd>" |
Commandes JIL
- delete_box
- delete_job
- insert_job
- override_job
- update_job
- delete_machine
- insert_machine
- update_machine
- delete_monbro
- insert_monbro
- update_monbro
- delete_resource
- insert_resource
- update_resource
Attributs d'un JOB
Obligatoire :
- job_type
- machine
Optionnel :
- alarm_if_fail
- application
- auto_delete
- auto_hold
- avg_runtime
- box_name
- box_terminator
- condition
- date_conditions
- days_of_week
- description
- exclude_calendar
- exec_time
- group
- job_load
- max_run_alarm
- min_run_alarm
- must_complete_times
- must_start_times
- n_retrys
- notification_id
- notification_msg
- owner
- permission
- priority
- resources
- run_calendar
- run_window
- send_notification
- service_desk
- start_mins
- start_times
- svcdesk_attr
- svcdesk_desc
- svcdesk_imp
- svcdesk_pri
- svcdesk_sev
- term_run_time
- timezone
Alias Autosys
#!/bin/sh alias lsjob='autorep -w -J ' alias startjob='sendevent -E STARTJOB -J' alias forcestartjob='sendevent -E FORCE_STARTJOB -J' alias se='sendevent -E' alias hold='sendevent -E JOB_ON_HOLD -J ' alias ice='sendevent -E JOB_ON_ICE -J ' alias jobdepends='job_depends -c -w -J ' alias killjob='sendevent -E KILLJOB -J ' alias offhold='sendevent -E JOB_OFF_HOLD -J ' alias office='sendevent -E JOB_OFF_ICE -J ' alias success='sendevent -E CHANGE_STATUS -s SUCCESS -J ' alias terminate='sendevent -E CHANGE_STATUS -s TERMINATED -J ' lsjob_jil () { if [ $# -ne 1 ] then echo "usage: $0 <job_name>" else jobname=$1 autorep -w -J "${jobname}" -q fi } lsjob_nextstart () { if [ $# -ne 1 ] then echo "usage: $0 <job_name|ALL>" else jobname=$1 date_start=`date +%Y/%m/%d` job_depends -t -J "${jobname}" -F "${date_start}" fi } autosys_alias () { echo "Pour afficher cette liste : autosys_alias" echo "" echo "Usage: lsjob <job_name|ALL>" echo "Usage: startjob <job_name>" echo "Usage: forcestartjob <job_name>" echo "Usage: se <EVENT> [-S AUTOSERV] [-A Alarm] [-J JobName] [-B GroupName] [-I ApplicationName] [-s Status] [-P Event Priority] [-M Max Send Trys ] [-q Job Queue Priority] [-G Global=Value] [-C Comment] [-U (Un-SENDEVENT)] [-T Time of Event] [-K Signal(s)] [-r Response] [-o Step Name] [-N Machine] [-x] [-?] [-F FileName]" echo "Usage: hold <job_name>" echo "Usage: ice <job_name>" echo "Usage: jobdepends <job_name>" echo "Usage: killjob <job_name>" echo "Usage: offhold <job_name>" echo "Usage: office <job_name>" echo "Usage: success <job_name>" echo "Usage: terminate <job_name>" echo "Usage: lsjob_jil <job_name>" echo "Usage: lsjob_nextstart <job_name>" } autosys_alias |
Autosys v11.3