From oracle-l-bounce@freelists.org Thu Apr 21 10:44:26 2005 Return-Path: Received: from air891.startdedicated.com (root@localhost) by orafaq.com (8.12.10/8.12.10) with ESMTP id j3LFiQrK029818 for ; Thu, 21 Apr 2005 10:44:26 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j3LFiQ4Z029814 for ; Thu, 21 Apr 2005 10:44:26 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id C94AD18577C; Thu, 21 Apr 2005 09:42:05 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10574-09; Thu, 21 Apr 2005 09:42:05 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 4FE271855CE; Thu, 21 Apr 2005 09:42:05 -0500 (EST) Message-ID: <17ECCBDCF27C544583F2CAD928F953260221FBCD@memex1.corp.cefs.int> From: "Knight, Jon" To: "'ranko.mosic@gmail.com'" , oracle-l@freelists.org Subject: RE: Lazy dbms_job Date: Thu, 21 Apr 2005 09:39:51 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 18739 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: jknight@concordefs.com Precedence: normal Reply-To: jknight@concordefs.com X-list: oracle-l X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on air891.startdedicated.com X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=ham version=2.63 >From my observations, it takes some time for the Oracle dbms_job processes to kick off your job if they're busy with something else. That's probably where your delay is coming from. One workaround would be a job that runs continually in a loop and executes the 3 procedures ASAP. I don't know that it's advisable to let a job run forever, so you could have the loop terminate itself every 5 minutes or so to give the database a chance to "breath". Thanks, Jon Knight -----Original Message----- From: oracle-l-bounce@freelists.org [mailto:oracle-l-bounce@freelists.org] On Behalf Of Ranko Mosic Sent: Thursday, April 21, 2005 8:25 AM To: oracle-l@freelists.org Subject: Lazy dbms_job I am running following procedure ( Oracle 9i ):=20 dbms_job.submit( l_job, 'background_submit_proc( JOB, NEXT_DATE);' ); create or replace procedure background_submit_proc( p_job in number, p_NEXT_DATE OUT DATE= ) as begin uui(); -- these are procedures that are executed; uui1();=20 uui2(); =09p_next_date :=3D sysdate + 1/24/60/60*1; exception when others then raise; end; / Whole thing runs fine. It modifies NEXT_DATE so it reschedules itself as soon as 3 procedures are finished. Procedures are very fast ( takes less than a second to execute them ). So job's NEXT_DATE should be incremented almost every second. It is not. It is incremented every 15 seconds.=20 Is there a way to make it more responsive ? I want it to execute every seco= nd .=20 Regards, Ranko. -- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-l