> Now as discussed, if the job is scheduled to start at 9:00 AM and
> runbs for 5 minutes it's next_date for run #2 will be 9:20, not 9:15, 
and it
> will creep 5 minutes every time.

No, as written, my jobs start on every quarter hour, regardless of 
runtime.

e.g. 09:00, 09:15, 09:30, 09:45 ...

Jared







[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
 01/22/2003 08:34 AM
 Please respond to ORACLE-L

 
        To:     Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
        cc: 
        Subject:        Re:RE: dbms_job - running jobs every 15 minutes


One potential problem with DBMS_JOBS as is being discussed here is that 
Oracle
computes the next_date at the end of the job.  They do that so that if a 
job
runs longer than it's schedule interval the two invocations will not run 
into
each other.  Now as discussed, if the job is scheduled to start at 9:00 AM 
and
runbs for 5 minutes it's next_date for run #2 will be 9:20, not 9:15, and 
it
will creep 5 minutes every time.

Dick Goulet

____________________Reply Separator____________________
Author: Freeman Robert - IL <[EMAIL PROTECTED]>
Date:       1/22/2003 7:09 AM

Cron? How 1980's.... :-))
 
RF
 

Robert G. Freeman
Technical Management Consultant
TUSC - The Oracle Experts www.tusc.com
904.708.5076 Cell (it's everywhere that I am!)
Author of several books you can find on Amazon.com! 

-----Original Message-----
Sent: Wednesday, January 22, 2003 7:19 AM
To: Multiple recipients of list ORACLE-L



I simplified it by using cron instead ... <g> 

Raj 
______________________________________________________ 
Rajendra Jamadagni              MIS, ESPN Inc. 
Rajendra dot Jamadagni at ESPN dot com 
Any opinion expressed here is personal and doesn't reflect that of ESPN 
Inc.

QOTD: Any clod can have facts, but having an opinion is an art! 


-----Original Message----- 
<mailto:[EMAIL PROTECTED]> ] 
Sent: Tuesday, January 21, 2003 7:24 PM 
To: Multiple recipients of list ORACLE-L 


Feeling particularly anal the other day,  I used the following 
specification to 
run statspack at the top of the hour, 15, 30 and 45 minutes after the 
hour. 

variable jobno number; 
variable instno number; 
begin 
        select instance_number into :instno from v$instance; 
        dbms_job.submit( 
                :jobno 
                , 'statspack.snap;' 
                -- every 15 minutes at 00,15,30 and 45 
                , trunc(sysdate,'hh24') +  ( ( 15 + ( 15 * 
floor(to_number(to_char(sysdate,'mi')) / 15))) / ( 24 * 60 )) 
                , 'trunc(sysdate,''hh24'') +  ( ( 15 + ( 15 * 
floor(to_number(to_char(sysdate,''mi'')) / 15))) / ( 24 * 60 ))' 
        ); 
        commit; 
end; 
/ 

Seems to me that the time specs could be simplified a bit. 
Anyone care to give it a go?  :) 
Jared 


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>RE: dbms_job - running jobs every 15 minutes</TITLE>

<META content="MSHTML 6.00.2800.1126" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=569311115-22012003><FONT face=Arial color=#0000ff 
size=2>Cron? 
How 1980's.... :-))</FONT></SPAN></DIV>
<DIV><SPAN class=569311115-22012003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=569311115-22012003><FONT face=Arial color=#0000ff 
size=2>RF</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<P><FONT face=Verdana size=2>Robert G. Freeman</FONT><FONT 
face="Times New Roman"><BR></FONT><FONT face=Verdana size=2>Technical 
Management

Consultant<BR>TUSC - The Oracle Experts www.tusc.com<BR>904.708.5076 Cell 
(it's 
everywhere that I am!)<BR>Author of several books you can find on 
Amazon.com!</FONT> </P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Jamadagni, Rajendra 
  [mailto:[EMAIL PROTECTED]]<BR><B>Sent:</B> Wednesday, January 
22, 
  2003 7:19 AM<BR><B>To:</B> Multiple recipients of list 
  ORACLE-L<BR><B>Subject:</B> RE: dbms_job - running jobs every 15 
  minutes<BR><BR></FONT></DIV>
  <P><FONT size=2>I simplified it by using cron instead ... 
&lt;g&gt;</FONT> 
</P>
  <P><FONT size=2>Raj</FONT> <BR><FONT 
  size=2>______________________________________________________</FONT> 
<BR><FONT

  size=2>Rajendra Jamadagni&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MIS, ESPN Inc.</FONT> 
<BR><FONT 
  size=2>Rajendra dot Jamadagni at ESPN dot com</FONT> <BR><FONT 
size=2>Any 
  opinion expressed here is personal and doesn't reflect that of ESPN Inc. 

  </FONT><BR><FONT size=2>QOTD: Any clod can have facts, but having an 
opinion 
  is an art!</FONT> </P><BR>
  <P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From: 

  [EMAIL PROTECTED] [<A 
  href="mailto:[EMAIL PROTECTED]";>mailto:[EMAIL PROTECTED]</A>]</FON
T> 
  <BR><FONT size=2>Sent: Tuesday, January 21, 2003 7:24 PM</FONT> 
<BR><FONT 
  size=2>To: Multiple recipients of list ORACLE-L</FONT> <BR><FONT 
  size=2>Subject: dbms_job - running jobs every 15 minutes</FONT> </P><BR>
  <P><FONT size=2>Feeling particularly anal the other day,&nbsp; I used 
the 
  following </FONT><BR><FONT size=2>specification to</FONT> <BR><FONT 
size=2>run

  statspack at the top of the hour, 15, 30 and 45 minutes after the 
  </FONT><BR><FONT size=2>hour.</FONT> </P>
  <P><FONT size=2>variable jobno number;</FONT> <BR><FONT size=2>variable 
instno

  number;</FONT> <BR><FONT size=2>begin</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select instance_number 
into 
  :instno from v$instance;</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
dbms_job.submit(</FONT> 
  <BR><FONT 
 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp; 
  :jobno</FONT> <BR><FONT 
 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp; 
  , 'statspack.snap;'</FONT> <BR><FONT 
 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp; 
  -- every 15 minutes at 00,15,30 and 45</FONT> <BR><FONT 
 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp; 
  , trunc(sysdate,'hh24') +&nbsp; ( ( 15 + ( 15 * </FONT><BR><FONT 
  size=2>floor(to_number(to_char(sysdate,'mi')) / 15))) / ( 24 * 60 
))</FONT> 
  <BR><FONT 
 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp; 
  , 'trunc(sysdate,''hh24'') +&nbsp; ( ( 15 + ( 15 * </FONT><BR><FONT 
  size=2>floor(to_number(to_char(sysdate,''mi'')) / 15))) / ( 24 * 60 
))'</FONT>

  <BR><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );</FONT> 
  <BR><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
commit;</FONT> 
  <BR><FONT size=2>end;</FONT> <BR><FONT size=2>/</FONT> </P>
  <P><FONT size=2>Seems to me that the time specs could be simplified a 
  bit.</FONT> <BR><FONT size=2>Anyone care to give it a go?&nbsp; 
:)</FONT> 
  <BR><FONT size=2>Jared</FONT> </P></BLOCKQUOTE></BODY></HTML>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to