Return-Path: <root@fatcity.cts.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id h0MM9Xb03272
 for <oracle-l@orafaq.net>; Wed, 22 Jan 2003 16:09:33 -0600
X-ClientAddr: 209.68.248.164
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id h0MM9Wp03266
 for <oracle-l@orafaq.net>; Wed, 22 Jan 2003 16:09:32 -0600
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id KAA92695;
 Wed, 22 Jan 2003 10:52:43 -0800 (PST)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 00537AF3; Wed, 22 Jan 2003 10:41:20 -0800
Message-ID: <F001.00537AF3.20030122104120@fatcity.com>
Date: Wed, 22 Jan 2003 10:41:20 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: Jared.Still@radisys.com
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: Jared.Still@radisys.com
Subject: Re:RE: dbms_job - running jobs every 15 minutes
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

> 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







dgoulet@vicr.com
Sent by: root@fatcity.com
 01/22/2003 08:34 AM
 Please respond to ORACLE-L

 
        To:     Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
        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 <FREEMANR@tusc.com>
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:Jared.Still@radisys.com> ] 
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:Rajendra.Jamadagni@espn.com]<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: 

  Jared.Still@radisys.com [<A 
  href="mailto:Jared.Still@radisys.com">mailto:Jared.Still@radisys.com</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: dgoulet@vicr.com

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: ListGuru@fatcity.com (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: Jared.Still@radisys.com

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: ListGuru@fatcity.com (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).

