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

Home -> Community -> Usenet -> c.d.o.misc -> Re: job is not on time

Re: job is not on time

From: x <x_at_x.hr>
Date: Thu, 11 Mar 2004 18:22:51 +0100
Message-ID: <c2q75h$t9f$1@ls219.htnet.hr>


> #oracle 9i enterprise on red-hat
>
> Hi all
> I can't get an oracle job to repeat at the desired time every day
>
> it should start at 6am every day
> it works the very first time, but the day after just start at midnight
>
> the job is created with the following script:
>
> variable jobno number;
> variable instno number;
> BEGIN
> dbms_job.submit(
> :jobno,
> 'scott.engine_pck.my_proc;',
> trunc(sysdate+1)+6/24,
> 'trunc(sysdate+1)',
> TRUE);
>
> COMMIT;
> END;
For next date you use trunc(sysdate+1).
When your job runs for the first time, it evaluates trunc(sysdate+1), and it is next midnight.
You should use 'sysdate+1' instead. Received on Thu Mar 11 2004 - 11:22:51 CST

Original text of this message

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