Understanding Job Scheduling Dependencies

advertisement
Understanding Job Scheduling Dependencies
AutoSys Release: 11.3 SP1
Intended Audience: Business
This job doc is broken into several sections, covering the attributes that impact scheduling – when appropriate the screen captures will include
both Job Detail page view and the JIL (Job Information Language view). Note that the ‘Job Type’ does not display on the QVIEW page. Also, the
JIL name (Job Information Language) has an embedded hyperlink which will take you directly to that section of this document.
These job attributes covered in this document include (‘Page Name’, ‘JIL Name’:
 ‘Job Type’, ‘job_type’
 ‘Date/Time conditions’, ‘date_conditions’
 ‘Run calendar’, ‘run_calendar’
 ‘Exclude calendar’, ‘exclude_calendar’
 ‘Run Days’, ‘days_of_week’
 ‘Minutes after each hour’, ‘start_mins’
 ‘Times of day’, ‘start_times’
 ‘Run Window’, ‘run_window’
 ‘Condition’, ‘operator’, and ‘type’
 ‘Send alarm on failure’, ‘alarm_if_fail’
 ‘status_code’ (‘Success’, ‘Failure’, ‘Inactive’, ‘On Ice’, ‘On Hold’, etc.)
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 1
Attribute: job_type
Comments or Screen Captures:
The Job Type attribute identifies the type of Job AutoSys should run; and there may be different required fields, depending on the Job Type.
job_type: box
There are two ways to identify a job_type of ‘box’:
1) A Job Box does not contain ‘command’ line attributes (Job Boxes are used to group and manage Job Streams – they do not execute Jobs by
and of themselves).
2) A Job box should also be identified by naming convention - the sixth character in the AutoSys job name should reflect ‘B’ (Box).
Note: ‘Send alarm on failure’ is not flagged for Job Boxes; the University will only create incidents for Job Failures. If a job within a stream fails,
both the Job status and the Job Box status will reflect ‘failure’.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 2
Comments or Screen Captures:
Select the ‘Show JIL’ button to verify the job type.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 3
job_type: cmd (command)
There are two types of Jobs which are classified by AutoSys as commands - Job Type ‘cmd’:
1) A Job that contains ‘command’ line attributes not directly relating to a PeopleSoft ProcessPeopleSoft. These jobs contain a ‘C’ as the sixth
character in the naming convention.
Select the ‘Show JIL’ button to verify the job type.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 4
2) A job which will execute a PeopleSoft Run Control - the sixth character in the AutoSys job name should reflect ‘P’ (PeopleSoft); and the
command line will also include ‘auto_ps7’.
Select the ‘Show JIL’ button to verify the job type.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 5
job_type: fw (file watcher job)
The University currently uses one other job type - ‘fw’ (file watcher). A ‘File Watcher’ job has ‘F’ as the sixth character in the Job Naming
convention; and includes a ‘File Watcher’ section.
Select the ‘Show JIL’ button to verify the job type.
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 6
Attribute: date_conditions
Comments or Screen Captures
For a job to run ‘standalone’, the ‘Date/Time conditions’ attribute in the ‘Schedule’ section must reflect ‘true’. If the date_conditions field is not set
to ‘1’ (true), AutoSys will review ignore any ‘Days’ or ‘Time’ attributes and rely solely of dependencies for scheduling.
If the ‘Date/Time conditions are ‘true’, the job or job box will also reference ‘Run days’, or ‘Run calendar’ and/or ‘Exclude Calendar’; and, ‘Times
of day’ or ‘Minutes past hour’. These attributes will be covered in more details in other sections of this document.
This Job Box (ACPAPBN.Nightly) will be selected and displayed on the forecast if the forecast date and time frame is populated on the
referenced run calendar. If the ‘Date/Time conditions’ field were blank, the job would not display on the forecast; nor would it run without manual
intervention.
Note: There is a way to identify this Job as a ‘Job Box’ - a Job Box does not contain ‘command’ line attributes (Job Boxes are used to group and
manage Job Streams – they do not execute Jobs by and of themselves).
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 7
Attribute: run_calendar
Comments or Screen Captures
This Job Stream (ACPAPBN.Nightly) is scheduled to use a calendar to determine which days it should run (Run Calendar ‘DX_Mo-Fr’). If the
current date is populated on the DX_Mo-Fr’ calendar; the job will be scheduled to begin at 19:00 (7:00 p.m.).
Note that the ‘Date/Time conditions’ must be ‘true’ or the job will not run; regardless of the other attributes provided.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 8
Calendar ‘DX_Su-Fr’ is fairly self explanatory - it will run Sunday through Friday.
Note: The business does not currently have access to view calendars; a separate document will be created to detail the full calendar functionality.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 9
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 10
Attribute: exclude_calendar
Comments or Screen Captures
In addition to specifying a run calendar, job EXPEPPN.UMFEX002 also documents exceptions by specifying an Exclude Calendar (‘Holidays’)
If the current date is populated on the DX_Tu-Sa’ calendar, but not on the ‘Holidays’ calendar; the job will be scheduled to begin at 1:00 a.m.
Note: ‘Date/Time conditions’ must be true in order for the job to process systematically (the job will not be scheduled to run, if this value is false).
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 11
Comments or Screen Captures
A ‘run calendar’ specifies the days on which a job should run, such as Tuesday through Saturdays, each week.
In this example, the ‘Processing Days’ are highlighted in green. Unless referenced on the exclude calendar, the job will run on any day
highlighted (the next screen capture will cover exclude calendar attributes).
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 12
Comments or Screen Captures
This calendar does not utilize the ‘Reschedule Rule’ functionality.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 13
Comments or Screen Captures
An ‘exclude calendar’ specifies the days on which a job should not run. For example, to help ensure that a job never runs on any University
holiday, a calendar named Holidays has been created, and each corporate holiday selected as a processing day.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 14
Comments or Screen Captures
This calendar does not utilize the ‘Reschedule Rule’ functionality.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 15
Comments or Screen Captures
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 16
Attribute: days_of_week
Comments or Screen Captures
The ‘days_of_week’ or ‘Run Days’ attribute specifies the exact days a job should be scheduled to run. This attribute cannot be used in
combination with a run calendar, (run_calendar).
The following is an example of a Job that is scheduled to run Monday-Saturday, and will run every five minutes on those days.
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 17
Attribute: start_mins
Comments or Screen Captures
The ‘start_mins’ attribute identifies the exact minutes after each hour the specified job should run. ‘Minutes after each hour’ can not be used in
combination with the ‘start_times’ attribute.
In this example, the job is scheduled to run every five minutes.
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 18
Attribute: start_times
Comments or Screen Captures
The ‘start_times’ attribute identifies the exact time a specified job should run. ‘Times of day’ can not be used in combination with the ‘Minutes
after each hour’ attribute. Note that these times are recorded in miltary format (the 24-hour military time format).
In this example, the job is scheduled to run at one o’clock each morning.
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 19
Attribute: run_window
Comments or Screen Captures
The ‘run_window’ attribute identifies the exact time interval a specified job should run. The Run Window attribute is not a starting condition; it
acts as an additional control - all starting condition attributes must be met for the specified job to be scheduled.
In this example, the job is scheduled to run at 1, 21, and 41 minutes past the hour between 8:01 a.m. and 5:04 p.m.
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 20
Attribute: operator
Comments or Screen Captures
There are two condition operator’s, ‘&’ and ‘|’, ‘and’ and ‘or’ respectively.
In the following examples both the referenced jobs must complete (with a status of ‘SUCCESS’, ‘FAILURE’, or ‘TERMINATED’), in order for this
job to be scheduled to run by AutoSys.
Comments or Screen Captures
In this example, the job will be scheduled by AutoSys if ‘TREAPCH.Sleep_Bremer-PD’ completes with a status of ‘SUCCESS’, ‘FAILURE’, or
‘TERMINATED’
Or
If ‘TREAPCN.FTP_Bremer-PD’ completes with a status of ‘FAILURE’.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 21
Comments or Screen Captures
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 22
Attribute: type
Comments or Screen Captures
Type, or status attributes futher define conditions. There are several Job Status Dependencies that can be used to control when a job should
run; or when a job should not run.
 ‘d’ (done)
 ‘f’ (failure)
 ‘n’ (notrunning)
 ‘s’ (success)
 ‘t’ (terminated)
Each of these will be discussed in more detail; followed by some specific examples.
‘d’ (done)
Indicates that the job you are defining may run when the job specified within the condition completes with a status of SUCCESS, FAILURE, or
TERMINATED.
‘f’ (failure)
Indicates that the job you are defining may run when the job specified within the condition completes with a status of FAILURE.
‘n’ (notrunning)
Indicates that the job you are defining may run when the job specified within the condition is any value except RUNNING - preventing the
dependent job from running at the same time as the job referenced within the condition.
‘s’ (success)
Indicates that the job you are defining may run when the job specified within the condition completes with a status of SUCCESS.
‘t’ (terminated)
Indicates that the job you are defining may run when the job specified within the condition is TERMINATED.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 23
Comments or Screen Captures
‘d’ (done)
Indicates that the job you are defining may run when the job specified within the condition completes with a status of SUCCESS, FAILURE, or
TERMINATED.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 24
Comments or Screen Captures
‘s’ (success)
Indicates that the job you are defining may run when the job specified within the condition completes with a status of SUCCESS.
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 25
Attribute: alarm_if_fail
Comments or Screen Captures
The ‘alarm if fail’ must be true for the specified job to be selected for a job failure to create a ServiceNow incident. The AutoSys job that was
created to send job failure details to ServiceNow will not select any job where ‘Send alarm on Failure’ is false.
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 26
Attribute: status_code
Comments or Screen Captures
You can use ‘mouse over text’ to identify the various job status codes; but we have also included some within this section of the job doc.
The ACTIVATED status indicates that the top-level box in which the job resides is currently in the RUNNING state. This status is internally
controlled and does not have an associated event.
The FAILURE status indicates one of the following:
■ For a command job, the command exited with a code greater than the maximum success value specified for the job.
■ For a box job, the failure conditions for the box evaluated to true.
The INACTIVE status indicates that the job is inactive; it has no status, by (or in) itself. For example, a newly created job which has not run is
inactive.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 27
Comments or Screen Captures
The ON_HOLD status indicates that the job is on hold and will not run until it receives the JOB_OFF_HOLD event.
The ON_ICE status indicates that the job is removed from all conditions and logic, but is still defined. Operationally, this is the equivalent of
deactivating the job.
The RESTART status indicates that a job that could not start because of hardware or application problems has been scheduled to restart.
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 28
Comments or Screen Captures
The RUNNING status indicates that the job is running. If the job is a box, the RUNNING status indicates that jobs in the box may be started
(other conditions permitting). If the job is a command or file watcher job, the RUNNING status indicates that the specified process is running on
the client.
The STARTING status indicates that the scheduler has initiated the start procedure with the agent and the job is in the process of “coming up.”
This status does not apply to box jobs.
The SUCCESS status indicates that the job exited and is considered successful, as determined by the exit code (for a command job) or the
success conditions (for a box job).
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 29
Comments or Screen Captures
The TERMINATED status indicates that the job was terminated.
Back to top
AutoSys r11.3 Understanding Job Scheduling Dependencies V3.docx
Version 3, 7/30/2013
Page 30
Download