Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: dbms_jobs is not executing properly
Is the probelm that the job doesn't run at all, it doesn't do what you want it to do, or that it doesn't run everyday. Assuming that the job does run once and does do what you want it to do, let's look at the values of next and interval.
next_date=>trunc(sysdate)+1,
trunc(sysdate) rolls the clock back to 0:00 today and +1 move it ahead
to tomorrow. So, the first time this will run is at 12:00 am
tomorrow.
interval=>'trunc(sysdate+1)+1');
sysdate+1 means tomorrow at the same time. Trunc(sysdate+1) means
tomorrow at 12:00am. Therefore trun(sysdate+1)+1 means the day after
tomorrow at 12 am.
The interval parameter defines how often the job should run. It is
currently set to two days from the last run. If you want it to run
everyday at 12:00am, change it to:
interval=>'trunc(sysdate+1)');
Hope this helps,
Patrick
In article <8lhrfn$t6g$1_at_nnrp1.deja.com>,
senthil <rsenthilkumar_at_my-deja.com> wrote:
> hi there,
>
> i am trying to insert a row to a particular table on everyday. here
the
> code looks like this,
>
> declare
> vjobno := number;
> begin
> dbms_job.submit(vjobno,
> what=>'insert into emp (this_day) values
(sysdate)',
> next_date=>trunc(sysdate)+1,
> interval=>'trunc(sysdate+1)+1');
> end;
>
> is there anything wrong in it. but the job is not running at the
> specified time.
>
> Any suggestion is appreciated.
>
> thanks,
> senthil.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Jul 24 2000 - 00:00:00 CDT