dbms_job how to run it on exact time [message #69771] |
Mon, 04 March 2002 12:19 |
Vaidhe T
Messages: 1 Registered: March 2002
|
Junior Member |
|
|
Hi,
I am trying to run a stored proc using dbms_job at exactly certain times repeatedly.
Example: I need to run it at 6:30, 7:00, 7:30 etc.
Problem: When I use an a start time and say for the increment (sysdate + 30/1440), sometimes the job runs at say 6:45 and every interval after that is screwed up because the next run will be at 7:15, 7:45 etc. I do not know why it gets delayed sometimes (maybe the server was too busy doing other things)
How can I make the job run at the specified times?
Please help!!!!
Vaidhe.
|
|
|
Re: dbms_job how to run it on exact time [message #69777 is a reply to message #69771] |
Mon, 04 March 2002 18:52 |
Jim Willis
Messages: 11 Registered: October 2001
|
Junior Member |
|
|
I don't know if this helps or not but:
Although DBMS_JOB is great, If I want to run things on the exact time everytime (on UNIX), I'll use CRON instead. This doesn't answer your question but may offer an alternative that always works for me.
Jim
|
|
|
Re: dbms_job how to run it on exact time [message #71016 is a reply to message #69771] |
Tue, 27 August 2002 04:25 |
ritesh kumar tiwary
Messages: 7 Registered: August 2002
|
Junior Member |
|
|
hi ,
your problem should be sloved in this procedure .
but procedure are written for one second backup
you see and slove this problem. and send mail my friend.
if your problem do not solve then send mail. i am
waiting for you.
create or replace procedure backup
as
BEGIN
DBMS_SNAPSHOT.REFRESH('ACCOUNTS','?');
end;
/
VARIABLE JOBNO NUMBER;
BEGIN
1 2
DBMS_JOB.SUMIT(:JOBNO,'BACKUP;',SYSDATE,NEXT SYSDATE +1/24*60*60);
END;
print jobno;
it will be taken 1 second backup.
this is the procedure
example :- 140
run procedure
exec dbms_job.run(140);
|
|
|