Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Drift of timing in DBMS jobs

Re: Drift of timing in DBMS jobs

From: Bricklen <bricklen_at_shaw.ca>
Date: Sat, 16 Feb 2002 12:59:56 GMT
Message-ID: <3C6E5762.52C81865@shaw.ca>


DBMS_JOB.SUBMIT(:v_JobNum,'proc1;',TRUNC(sysdate,'DD'),'TRUNC(sysdate+1,''DD'')'); --midnight
DBMS_JOB.SUBMIT(:v_JobNum,'proc2;',TRUNC(sysdate,'HH'),'TRUNC(sysdate,''MI'')+10/(24/60)'); -- 10 mins apart
DBMS_JOB.SUBMIT(:v_JobNum,'proc3;',TRUNC(sysdate,'MI'),'TRUNC(sysdate,''MI'')+2/(24/60)'); -- every 2 mins
DBMS_JOB.SUBMIT(:v_JobNum,'proc4;',TRUNC(sysdate,'HH')+1/24,'TRUNC(sysdate,''MI'')+30/(24/60)'); -- every 30 mins

truncating (as Mark mentioned) the start-time and intervals will start and run your jobs without slippage.

Sybrand Bakker wrote:
>
> On 16 Feb 2002 05:00:22 GMT, xux_at_informa.bio.caltech.edu (Xuequn Xu)
> wrote:
>
> >I found this problem with jobs submitted by DBMS_JOB:
> >
> >Say a job is scheduled to run at 8:00 every day, and
> >the execution of the job takes about 10 minutes. Gradually,
> >you will find that the start time of the job will drift to
> >9:00, or even later. The problem is that, the first
> >execution might be at 8:00 sharp, but the next time it will
> >start at 8:10, and the next at 8:20, and so on (assume it
> >takes 10 minutes for the job to finish once). The timing
> >simply drifts and there is no way to control it, other than
> >remove and re-schedule the job. Why is that? Shuldn't the DBMS
> >jobs be as precise in timing as the Unix cron jobs are?
>
> Just must have submitted to jobs to run every 24 hour, instead of at
> 08:00 every day sharp.
>
> Hth
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
Received on Sat Feb 16 2002 - 06:59:56 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US