Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to schedule a job every day
In article <999lvl$1it7$1_at_news.itri.org.tw>, ceiling
<ceiling_at_autumn.ccl.itri.org.w> writes:
>HI ALL:
> We need to create a job which run in 10:00PM every day,
> when set the interval to 'sysdate+1',it seem work fine. But
>after a few day,
> there are two problem occur:
> 1.the job execution time although approximately 10:00PM, but
>incremental every day,like
> day 1: 10:00PM
> day 2: 10:05PM
> day 3: 10:08PM
> but we want the job run in 10:PM every day
> 2.when we shutdown database in some day, and startup in
>another day.
> Suppose startup in 09:00AM,
> we find the job's next_date would be altered to 09:00AM
>
> how can we solve these problem. Thanks in advance
>
>
How about changing the date math to something like this:
UT1> l
1 select to_char(((trunc(sysdate) + 10/24) + 1),'YYYYMMDD HH24:MI:SS') as
NEXT,
2 to_char(sysdate,'YYYYMMDD HH24:MI:SS') as NOW
3* from sys.dual
UT1> /
NEXT NOW
----------------- -----------------
![]() |
![]() |