Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: RE: dbms_job - running jobs every 15 minutes
('binary' encoding is not supported, stored as-is)
Robert,
I am afraid that you will soon run into the 'slipping job' syndrom. Without any 'trunc' (or anything functionally similar), 'sysdate' in the interval happens to be the date when the job started - which may be up to one minute (usually) the time when you asked it to start. Means that you can easily slip by four minutes every hour.
I agree with adding 15/1440 (one day = 1440mn), but your base time musn't be 'sysdate' but sysdate rounded to the nearest quarter of an hour. Considering that a quarter of an hour is a 96th (24 * 4) of a day you have several more or less complicated ways to do it. Vladimir (whose formula I am still trying to understand :-)) took the seconds since midnight, you can also do something such as
[today 00:00] trunc(sysdate)
+ [current time rounded to the latest quarter of an hour] floor((sysdate - trunc(sysdate))* 96) / 96
+ 15/1440
HTH,
Stephane Faroult
Oriole
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Stephane Faroul INET: sfaroult_at_oriolecorp.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Jan 22 2003 - 02:44:38 CST
![]() |
![]() |