Autosys Job - Management

Creating an Autosys box job:

copy the below JIL code that consist of box with a job into a text editor

vi box_w_DBA_reorg_BID_bidev.txt

Add this job to the autosys by $  jil < box_w_DBA_reorg_BID_bidev.txt


/* ----------------- box_w_DBA_reorg_BID_bidev ----------------- */

insert_job: box_w_DBA_reorg_BID_bidev   job_type: b
owner: orabid@bidev
permission: gx,ge,wx,we,mx,me
date_conditions: 1
days_of_week: su
start_times: "12:00"
description: Weekly Reorg for four tables on BID on bidev
box_terminator: 1
job_terminator: 1
alarm_if_fail: 0


 /* ----------------- job_w_DBA_reorg_BID_bidev ----------------- */

 insert_job: job_w_DBA_reorg_BID_bidev   job_type: c
 box_name: box_w_DBA_reorg_BID_bidev
 command: /dbbackups/BID/scripts/re_org_BIDEV_tables.sh > /dbbackups/BID/logs/AutoSys_BID_`date +%m%d%Y`.hot.out 2>&1
 machine: bidev
 owner: orabid@bidev
 permission: gx,ge,wx,we,mx,me
 description: Weekly Reorg of tables first four tables on bidev
 box_terminator: 1
 alarm_if_fail: 0

Commands: to manage the Jobs

se JOB_OFF_ICE -J box_d_DBA_hotbkup_GTA_gtsaqa

sendevent -E KILLJOB -J <JOB_NAME>

sendevent -E JOB_OFF_ICE -J box_d_DBA_hotbkup_SCA_scmaqa

sendevent -E JOB_ON_ICE -J box_d_DBA_hotbkup_SCA_scmaqa

sendevent -E DELETEJOB -J box_w_DBA_Reorg_BIQ_biqat


Updating an exsisting JIL code - Update a job

Open up a file.txt 

update_job: BOX_NAME/JOB_NAME 

update_job: job_w_DBA_reorg2_BID_bidev
command:  /oracle/BID/scripts/dba/re_org2_BIDEV_tables.sh > /dbbackups/BID/logs/AutoSys_BID_`date +%m%d%Y`.hot.out 2>&1

jil < file.txt

Check the status of your job and do more with autorep command

autorep -J box_d_DBA_hotbkup_SRD_srmdev -d

1)      Autorep
Syntax : autorep -J job_name [ -d | -q | - r run_number ]
Description : autorep lists a variety of information about jobs
Options       :
-J job_name
 Indicates that a Job Report is desired. To report on all jobs, specify ALL. The %    character may be used in the job name as a wildcard
-d   Indicates a Detail Report is desired.
For a Job Report, all events from the last run of the requested job will be listed.
 -q   Indicates a Query Report is desired, providing the current job or machine definition, in JIL format, as it exists in the AutoSys database.
-r run_num
Indicates a report is desired for a specific job run (run_num). This option can only be used with the -s and -d options. If this option is omitted, or run_num is zero, the most current job run is reported. A minus sign (-) can be used before the run_num value to indicate a relative counter for a past job run, relative to the current run number. For example, the option r -2 would generate a report for the job run two runs back.


No comments:

Post a Comment