Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Job Wont Run - Cant See Reason Why...
I wrote some code to make it easier to submit a job...
lFunction:='WorkFlow.AutoSend();';
select AutoSend,AutoSendTime into lAutoSend,lAutoSendTime from
WORKFLOW_CONFIG;
IF lAutoSend=1 THEN
--find the job id...
for x in (select job from dba_jobs where what=lFunction)
loop
--if found delete it
DBMS_JOB.REMOVE(x.job);
end loop;
--submit the job under the new timing factor..
DBMS_JOB.SUBMIT(jobid,lFunction,SYSDATE , 'SYSDATE +
'||to_char(lAutoSendTime)||'/1440');
END IF;
This seems to work ok...When I look in DBA_JOBS I see that everything
appears ok..
SQL> SELECT JOB, SUBSTR(WHAT,1,35), NEXT_DATE,BROKEN,INTERVAL FROM
DBA_JOBS;
JOB SUBSTR(WHAT,1,35) NEXT_DATE BINTERVAL
---------- ----------------------------------- --------- -
5 WorkFlow.AutoSend(); 14/APR/03 NSYSDATE + 1/1440 But the job simply will not run...If I call.. dbms_job.run(5);
BR
Tim
Received on Mon Apr 14 2003 - 08:55:52 CDT