Documente Academic
Documente Profesional
Documente Cultură
AutoSys is an automated job control system for scheduling, monitoring, and reporting jobs
There are the two methods you can use to create job definitions:
Using the AutoSys Graphical User Interface (GUI).
Using the AutoSys Job Information Language (JIL) through a command-line interface
There are three types of jobs: command, file watcher, and box.
Command jobs execute commands
Box jobs are containers that hold other jobs (including other boxes)
File watcher jobs watch for the arrival of a specified file.
An autosys box
W9DCPOST_AVRM_BOX
--------W9RCH_LOG_AVRM_JOB
----W9RCINP_POST_AVRM_JOB
----W9IPCCLEAN_POST_AVRM_JOB ----W9REPORT_POST_AVRM_JOB ----W9ENDSTAT_POST_AVRM_JOB ----W9DONE_POST_AVRM_JOB
----W9REVOP_TRAFF_AVRM_JOB ----W9REVOP_POST_AVRM_JOB
-----
IN 0/0
Box name, Status is INACTIVE
----IN 0/0
Jobs under box
----IN 0/0
----IN 0/0
----IN 0/0
----IN 0/0
----IN 0/0
----IN 0/0
----IN 0/0
Terminated. The job terminated while in the RUNNING State. A job can be terminated if a user sends a
KILLJOB event or if it was defined to terminate if the box it is in failed. If the job itself fails, it has a
FAILURE status, not a TERMINATED status. A job might also be terminated if it has exceeded the
maximum run time, or if it was killed from the command line via a UNIX kill command.
Command type jobs that Terminate will automatically be set to Failure for proper notification and tracking.
ON_HOLD. This job is on hold and will not be run until it receives the JOB_OFF_HOLD event or the
FORCE_STARTJOB command is issued.
RESTART. The job was unable to start due to hardware or application problems, and has been scheduled
to restart.
QUE_WAIT. The job has met all conditions but there are not enough machine resources available.
ON_ICE. This job is removed from all conditions and logic, but is still defined to
AutoSys. This is done usually just before decommissioning jobs.
Autosys Commands:
PS: You can set aliases for all these commands like one mentioned below
alias fs=sendevent -E FORCE_STARTJOB -J;
Commands:
1. autorep j ROL%
2. autorep j ROL% | grep RU Lists only the running jobs.(Use status for getting required output,
Status list in page 2)
3. autorep j W9DCPOST_AVRM_BOX -r -1 To check yesterdays job status i.e., number of run
back. If you want to check for previous days, try r -2, -r -3 etc
4.
5.
6. autorep j ROL% -l0 If you want report of the box use l0 (level 0) option.
7.
8. chk_auto_up
9. autoflags a
Lists autosys and system configuration details.
$ autoflags
Usage: autoflags -a|i|o|d|v|x|r|h|n
a -- ALL information
i -- tape id #
o -- operating system
d -- database
v -- AutoSys version #
x -- AutoSys full version #
r -- AutoSys release #
h -- hostid
n hostname
10. job_depends -t -J ALL -F:from_date in dd/mm/yyyy -T:to_date in dd/mm/yyyy Display all scheduled
jobs to run between these two dates.
16. Sendevent command is used for a variety of purposes, including starting or stopping AutoSys jobs,
stopping the Event processor, and putting a job on hold. This command is also used to set AutoSys
global variables or cancel a scheduled event. To issue sendevent for a job, you must have execute
permission for that job.
sendevent -E event [-A alarm] [-B group]
[-G "global_name=value"] [-I application]
[-J job_name] [-k signal_numbers]
[-M max_send_trys] [-N machine] [-P priority]
[-q job_queue_priority] [-s status]
[-S instance] [-T "time_of_event"] [-U cancel_specified_event]
To set a job to inactive:
sendevent E CHANGE_STATUS J <JOB_NAME> -s INACTIVE C <<Comment>>
-C comment : You can use this option to specify why you sent a KILLJOB event and this comment is
viewable in an autorep report. If comment contains spaces, you must enclose it in ".
-J job_name: Identifies the job to which to send the specified event.
Eg:
sendevent -J ROL-MAINT -E FORCE_STARTJOB -C "Transient issue, restarting once"
To set a job to success
sendevent E CHANGE_STATUS J <JOB_NAME> -s SUCCESS
Note: Changing the status to RUNNING does not cause the job to run. It just changes the status of the
job in the database. Also, If you change the status of a box to INACTIVE, it changes all the jobs under the
box to INACTIVE
To force start a job:
sendevent E FORCE_STARTJOB J <JOB_NAME>
When you set a job to SUCCESS or ON_ICE, the depending jobs on it may run because it is still
set to run.
If a job is ON_HOLD, it will not run until it is force started or set to inactive for a normal run.
Use KILL command to kill a job. Once the job has been KILLED, it can be marked ON-HOLD,
SUCCESS or INACTIVE, or whatever supported status you wish to assign to it.