Proc. called automatically from dB [message #38683] |
Mon, 06 May 2002 05:14 |
Anthony
Messages: 48 Registered: September 2000
|
Member |
|
|
Can someone point me in the direction of where to start looking for following scenario.
I need a PL/SQL procedure to be executed every X minutes. The procedure doesn´t need any parameters. I am using oracle 8.1.7 on a unix server. Is there some sort of control in Oracle where I can say execute this proc every 5 minutes. There is a powerbuilder app. which is the front end of the db (of which I nothing about) or would I have to place the call to execute the proc here?
TIA
Anthony
|
|
|
Re: Proc. called automatically from dB [message #38686 is a reply to message #38683] |
Mon, 06 May 2002 06:03 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
use dbms_job builtin.
the procedure execute here is MAIN1. To specify '4:00 tomorrow' you need:
interval => 'TRUNC(SYSDATE) + 1 + (4/24)'
--------------------------------------------------
DECLARE
jobno NUMBER;
BEGIN
DBMS_JOB.SUBMIT
(job => jobno
,what => 'begin MAIN1;end;'
,next_date => SYSDATE
,interval => 'TRUNC(SYSDATE) + 1 + (4/24)';
COMMIT;
END;
|
|
|