Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to schedule a job every day

Re: how to schedule a job every day

From: <xmark.powell_at_eds.com.x>
Date: 22 Mar 2001 15:17:30 GMT
Message-ID: <99d52a$5fn$1@news.netmar.com>

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

----------------- -----------------

20010323 10:00:00 20010322 10:15:13 Received on Thu Mar 22 2001 - 09:17:30 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US