Home » Other » Client Tools » Proc. called automatically from dB
Proc. called automatically from dB [message #38683] Mon, 06 May 2002 05:14 Go to next message
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 Go to previous message
Mahesh Rajendran
Messages: 10707
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;
Previous Topic: Re: rollback segment
Next Topic: substr
Goto Forum:
  


Current Time: Thu Mar 28 10:38:52 CDT 2024