Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DBMS_JOB, how to execute a script every day at 06 am

624581May 27 2009 — edited May 28 2009
Hi

I want to execute a job every day at 06:00 am. To do this, I have run this script yesterday the 26th.

DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'begin
tools.followup(1); tools.purge (20);
end;'
,next_date => to_date('27/05/2009 06:00','dd/mm/yyyy hh24:mi:ss')
,interval => TRUNC(SYSDATE+1)+6/24
,no_parse => FALSE
);
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;
/


The problem is that after the first execution next_date was 27th 06:02 !!!!

Is it a bug ?

Thanks in advance
A.G.
This post has been answered by JustinCave on May 28 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2009
Added on May 27 2009
4 comments
737 views