 |
|
Oracle Tips by Burleson |
Chapter 3 - Time-Based Job Scheduling
Complex Date Rules
for Job Execution
It would appear that all of the above expressions give exactly the
same run schedule regardless of which syntax is used. In practice
this not true because PL/SQL expressions can allow the run schedules
of jobs to slide.
The scheduler attempts to execute all jobs on
time, but in practice there is often a small delay. When a job is
executed, the first thing that happens is the next run date is
calculated using the specified repeat interval. Since most PL/SQL
expressions use either the sysdate or systimestamp
functions, the actual start date may be slightly later than the jobs
original next run date. Over several iterations of the job, this
could add up to a noticeable difference between the times the job is
expected to run and when it actually does run. Table 3.12 gives an
example of the sort of slide that might be seen if the scheduler is
consistently 10 seconds late in executing a job that was originally
intended to run a 09:00:00 each day.
|
RUN |
ACTUAL START DATE |
NEXT RUN DATE |
|
1 |
01-JAN-2004 09:00:10 |
02-JAN-2004 09:00:10 |
|
2 |
02-JAN-2004 09:00:20 |
03-JAN-2004 09:00:20 |
|
3 |
03-JAN-2004 09:00:30 |
04-JAN-2004 09:00:30 |
|
4 |
04-JAN-2004 09:00:40 |
05-JAN-2004 09:00:40 |
|
5 |
05-JAN-2004 09:00:50 |
06-JAN-2004 09:00:50 |
|
6 |
06-JAN-2004 09:01:00 |
07-JAN-2004 09:01:00 |
Table 3.12 – The time slide phenomenon
|
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|