Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle job question
Sure - easy to do. Here are a few changes you need to make.
CREATE OR REPLACE PROCEDURE CLEAN IS
BEGIN
/* Put your code here - whatever you are trying to do. */
COMMIT;
END CLEAN;
/
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X ,what => 'CLEAN;' ,next_date => to_date('15/12/2006 7:00:00','dd/mm/yyyy hh24:mi:ss') ,interval => 'SYSDATE + 1/1440' ,no_parse => TRUE
commit;
Jun wrote:
> Hi Guys,
>
> I am using Oracle 9i and I am new to Oracle job, I created a procedure
> called 'CLEAN'
>
> and I used the following procedure to test my job.
>
> create or replace PROCEDURE TESTING AS
> JobNo user_jobs.job%TYPE;
>
> BEGIN
> dbms_job.SUBMIT(JObNO,'begin CLEAN; end;', sysdate,'SYSDATE +
> 1/1440');
> commit;
> END;
>
> it should run the job every minute but seems it is not working. what's
> wrong with it?
> and How can I set the job to be run every 4 hours between 8am and 8pm
> everyday?
> Any help or example would be highly appreciated.
Received on Fri Dec 15 2006 - 08:59:19 CST