Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> About DBMS_JOB Package question.
I want to implement a Task Schedule,so that a task can started at a assigned
time and stoped at another assigned time and During the running,have a
interval pre 15 minutes,
The DBMS_JOB provide a procedure
DBMS_JOB.SUBMIT( job OUT BINARY_INTEGER,
what IN VARCHAR2,
next_date IN DATE DEFAULT SYSDATE,
interval IN VARCHAR2 DEFAULT 'null',
no_parse IN BOOLEAN DEFAULT FALSE)
In order to implement my idea,I user the follow statements:"
StartTime:= starttime;
EndTime:= endtime;
Interval:=15;
DBMS_JOB.SUBMIT(JobNo,
'MyProcedure(arg,...)',
StartTime,
'DECODE(ceil(EndTime-SysDate),0,NULL,SysDate+Interval/1440)',false);
"
when I try to execute it,have a error as follow:
"ORA-23319: parameter value
"DECODE(ceil(EndTime-SysDate),0,NULL,SysDate+Interval/1440)" is not
appropriate."
why? the DECODE function only for when ceil(Endtime-SysDate)=0 ,the
next_date will be NULL,the job will delete itself from Job queue,and if
not,the next start time assigned with SysDate+Interval/1440(after 15
minutes).
Any help would be appreciated. Received on Tue May 12 1998 - 01:36:19 CDT