Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS_JOB.SUBMIT ?
Hi,
In order to start this job every night at 23:58 you should change
INTERVAL parameter to
TRUNC(SYSDATE+1) + ((24*60*60 - 120)/(24*60*60))
After successful job execution the INTERVAL value will be calculated
and then assigned to NEXT_DATE parameter of a job.
So, we needed to add +1 day to that parameter to start your job the
next day.
dishan_at_gmail.com wrote:
> Hi,
> This is the job that schedule to run at every night 23:58pm.
> Can anybody please check the INTERVAL is correct or NOT.?
> ----------------------------------------------------------------------------------------------
> declare v_JobNum NUMBER;
>
> BEGIN
>
> DBMS_JOB.SUBMIT(
> v_JobNum,
> 'BEGIN UPDHITCOUNT(); END;',
> TRUNC(SYSDATE),
> 'TRUNC(SYSDATE) + ((24*60*60 - 180)/(24*60*60))' -- 23:58
> );
>
> dbms_output.put_line(v_JobNum);
>
> END;
> ----------------------------------------------------------------------------------------------
>
> Thanks in advance
>
> Dishan
Received on Mon Nov 06 2006 - 05:21:40 CST