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: DBMS_JOB hourly interval

Re: DBMS_JOB hourly interval

From: Alan <abkirch_at_excite.com>
Date: 14 Sep 2001 06:54:05 -0700
Message-ID: <353350a5.0109140554.419c5b7e@posting.google.com>


Thanks Tom. You're right. After I posted this I noticed what it was actually doing. I started searching your "Ask Tom" posts at the Oracle Magazine site but couldn't find anything for running jobs hourly. Thanks for your help.

By the way... I have found your book (Expert One-on-One) very helpful and insightful. Especially the the tuning section.

Thanks again,
Alan

Thomas Kyte <tkyte_at_us.oracle.com> wrote in message news:<9nrc4l01494_at_drn.newsguy.com>...
> In article <353350a5.0109131316.36b12e2a_at_posting.google.com>, abkirch_at_excite.com
> says...
> >
> >If anyone is looking to schedule a job using an hourly interval here
> >is the value for that parameter.
> >
> >DECODE(
> > SIGN(15 - to_char( sysdate,'MI'))
> > , 1
> > , sysdate + 60 + (15 - to_char(sysdate,'MI')) /1440
> > , -1
> > , sysdate + (60 + (15 - to_char(sysdate,'MI')))/1440
> > , sysdate
> > )
> >
> >Use this value for both the NEXT_DATE and the INTERVAL parameters to
> >prevent your job from sliding.
> >
>
> that seems to be adding 60 DAYS if the sign is +1??
>
> and the second one for -1 will "slide" -- its not based off of a known, fixed
> time.
>
> To avoid slides, you almost always need to use TRUNC to get a "known" time.
>
> >I thought I'd post this since I was looking for it the last few days
> >but finally I worked through it and got. If someone else got in an
> >easier fashion go ahead and post it.
>
>
> how about:
>
> trunc(sysdate,'hh')+1/24
>
> and
>
> 'trunc(sysdate,''hh'')+1/24'
>
>
>
> Now, no matter when the interval is computed -- it will be at the top of the
> NEXT hour.
Received on Fri Sep 14 2001 - 08:54:05 CDT

Original text of this message

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