DBMS_JOB, how to execute a script every day at 06 am
624581May 27 2009 — edited May 28 2009Hi
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.