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: HELP: DBMS_JOB QUESTION

Re: HELP: DBMS_JOB QUESTION

From: Huiming Li <huiming_at_jis.ne.jp>
Date: Wed, 22 Sep 1999 10:17:27 +0900
Message-ID: <37E82E27.29017222@jis.ne.jp>


Christopher Beck wrote:
> Since the interval time is
> determined before the job runs, you need to come up with some formula, that
> takes the slipping start time into account. Something like this should
> do for an interval assuming your initial start time was on the 00th, 15th, 30th,
>
> or 45th minute...
>
> to_date( to_char( sysdate, 'DDMMYYYYHH24' ) || '0000',
> 'DDMMYYYYHH24MISS' )
> + ( trunc( to_char(sysdate,'MI')/15 ) * 15 + 15 )/1440
>
> This will not guarantee that the job will start exactly at that time, but
> it will schedule it to start at the next appropriate time.
>

Thanks for the email.

I did not get what you mean. Is the formula above for DBMS_JOB.SUBMIT's NEXT_DATE parameter?

If so, I donot think it gonna work.

In fact, what I did is:

  DBMS_JOB.SUBMIT(:jobno, 'XYZ;',

                   to_date('19990922154000', 'YYYYMMDDHH24MISS'), 
                   'SYSDATE + 1/96);

  when I submitted the job, SYSDATE is 1999-09-21-15:25:00.   After I did that, the next_date and next_sec is set to 1999-09-21 and 15:40:00 in user_jobs;

  I think to_date('19990921154000', 'YYYYMMDDHH24MISS') will do the same kind of thing

       with
         to_date( to_char( sysdate, 'DDMMYYYYHH24' ) || '0000',
         'DDMMYYYYHH24MISS' )
         + ( trunc( to_char(sysdate,'MI')/15 ) * 15 + 15 )/1440 in your message.

Thanks again. Look forward to your reply.

Huiming Li Received on Tue Sep 21 1999 - 20:17:27 CDT

Original text of this message

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