Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: dbms_jobs

Re: dbms_jobs

From: <nlzanen1_at_EY.NL>
Date: Fri, 07 Sep 2001 02:46:47 -0700
Message-ID: <F001.0038632F.20010907014505@fatcity.com>

Hi, Jared,

I ran your scripts and indeed strange behaviour.

First of all I now tested my earlier statement (never had to work much with jobs before) and it appears to be incorrect. Interval is evaluated before the job starts and not after completion (As it says in the manual, that I have now read). Now the question is where does the 2:28 minutes come from. My best guess would be that Oracle is trying to reschedule to a point in the past and errors out on that (should be in your alert log) and retries to schedule it 1 minute later (won't work either because the interval is still in the past), then 2 minutes later, then 4 minutes later etc. doubling every time upto 16 times (According to the manual) So I guess combined with the wakeup time of your snp process and one of the intervals you'd end up at the time you ended up with

Jack

Jared Still <jkstill_at_cybcon.com>@fatcity.com on 07-09-2001 08:00:21

Please respond to ORACLE-L_at_fatcity.com

Sent by: root_at_fatcity.com

To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: (bcc: Jack van Zanen/nlzanen1/External/MEY/NL)

Any thoughts on how this was scheduled this way?

Schedule a job that takes 10 minutes, set the interval to run 5 minutes after the first job starts.

Here's the job:

create or replace procedure dummy
is
begin

Here's the submission:

declare

   jobno integer;
begin

   dbms_job.submit(

      job => jobno
      , what => 'dummy;'
      -- provide resolution to the second
      --                midnight        hour of        minute of    units
per day
      --             of current day    day to run      hr to run    ( 1
second )
      , next_date => trunc(sysdate) + ((21 * (60*60) + ( 60*45)) * (
1/(60*60*24)))
      , interval => 'trunc(sysdate) + ((21 * (60*60) + ( 60*50)) * (
1/(60*60*24)))'

   );
   commit;
end;
/

Here's before it ran:

   FAIL

SCHEMA_USE PRIV_USER  LOG_USER      JOB LAST_DATE           LAST_SEC
NEXT_DATE           NEXT_SEC TOTAL_TIME
B INTERVAL          URES WHAT
---------- ---------- ---------- ------ ------------------- --------
------------------- -------- ----------
- -------------------- ---- --------------------
JKSTILL    JKSTILL    JKSTILL        22
09/06/2001 21:45:00 21:45:00        244

N trunc(sysdate) + ((2 dummy;

  1 * (60*60) + ( 60*5

  0)) * ( 1/(60*60*24)

  ))

Here's after it ran:

   FAIL

SCHEMA_USE PRIV_USER  LOG_USER      JOB LAST_DATE           LAST_SEC
NEXT_DATE           NEXT_SEC TOTAL_TIME
B INTERVAL          URES WHAT
---------- ---------- ---------- ------ ------------------- --------
------------------- -------- ----------
- -------------------- ---- --------------------
JKSTILL    JKSTILL    JKSTILL        22 09/06/2001 21:45:14 21:45:14
09/06/2001 21:57:28 21:57:28        614

N trunc(sysdate) + ((2 1 dummy;

  1 * (60*60) + ( 60*5

  0)) * ( 1/(60*60*24)

  ))

Notice the next run time is 00:02:28 after completion of the first job.

Jared

On Thursday 06 September 2001 00:50, nlzanen1_at_EY.NL wrote:

> Hi
>
>
> As far as I know the job will be rescheduled after the job completes. So
in
> your examples the job will start one hour after the two hour job finishes.
>
>
> Jack
>
>
>
>
> David Turner <turner_at_tellme.com>@fatcity.com on 06-09-2001 05:35:32
>
> Please respond to ORACLE-L_at_fatcity.com
>
> Sent by:  root_at_fatcity.com
>
>
> To:   Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> cc:    (bcc: Jack van Zanen/nlzanen1/External/MEY/NL)
>
> I was wondering if you schedule a job to run every hour and say
> the job takes 2 hours to run. Will the next run of the job queue up
> or will it run in parallel with the current job? I'll be testing this
> but if anyone knows I would appreciate it?
>
> Also if the second job waits for the first job to finish how can you see
> how many jobs have queued up?
>
> Thanks, Dave
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: David Turner
>   INET: turner_at_tellme.com
>
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_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).
>
>
>
>
> =====================================================================
> De informatie verzonden in dit e-mailbericht is vertrouwelijk en is
> uitsluitend bestemd voor de geadresseerde. Openbaarmaking,
> vermenigvuldiging, verspreiding en/of verstrekking van deze informatie
aan
> derden is, behoudens voorafgaande schriftelijke toestemming van Ernst &
> Young, niet toegestaan. Ernst & Young staat niet in voor de juiste en
> volledige overbrenging van de inhoud van een verzonden e-mailbericht,
noch
> voor tijdige ontvangst daarvan. Ernst & Young kan niet garanderen dat een
> verzonden e-mailbericht vrij is van virussen, noch dat e-mailberichten
> worden overgebracht zonder inbreuk of tussenkomst van onbevoegde derden.
>
> Indien bovenstaand e-mailbericht niet aan u is gericht, verzoeken wij u
> vriendelijk doch dringend het e-mailbericht te retourneren aan de
verzender
> en het origineel en eventuele kopieŽn te verwijderen en te vernietigen.
>
> Ernst & Young hanteert bij de uitoefening van haar werkzaamheden algemene
> voorwaarden, waarin een beperking van aansprakelijkheid is opgenomen. De
> algemene voorwaarden worden u op verzoek kosteloos toegezonden.
> =====================================================================
> The information contained in this communication is confidential and is
> intended solely for the use of the individual or entity to whom it is
> addressed. You should not copy, disclose or distribute this communication
> without the authority of Ernst & Young. Ernst & Young is neither liable
for
> the proper and complete transmission of the information contained in this
> communication nor for any delay in its receipt. Ernst & Young does not
> guarantee that the integrity of this communication has been maintained
nor
> that the communication is free of viruses, interceptions or interference.
>
> If you are not the intended recipient of this communication please return
> the communication to the sender and delete and destroy all copies.
>
> In carrying out its engagements, Ernst & Young applies general terms and
> conditions, which contain a clause that limits its liability. A copy of
> these terms and conditions is available on request free of charge.
> =====================================================================
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Jared Still
  INET: jkstill_at_cybcon.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_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).




=====================================================================
De informatie verzonden in dit e-mailbericht is vertrouwelijk en is
uitsluitend bestemd voor de geadresseerde. Openbaarmaking,
vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan
derden is, behoudens voorafgaande schriftelijke toestemming van Ernst &
Young, niet toegestaan. Ernst & Young staat niet in voor de juiste en
volledige overbrenging van de inhoud van een verzonden e-mailbericht, noch
voor tijdige ontvangst daarvan. Ernst & Young kan niet garanderen dat een
verzonden e-mailbericht vrij is van virussen, noch dat e-mailberichten
worden overgebracht zonder inbreuk of tussenkomst van onbevoegde derden.

Indien bovenstaand e-mailbericht niet aan u is gericht, verzoeken wij u
vriendelijk doch dringend het e-mailbericht te retourneren aan de verzender
en het origineel en eventuele kopieŽn te verwijderen en te vernietigen.

Ernst & Young hanteert bij de uitoefening van haar werkzaamheden algemene
voorwaarden, waarin een beperking van aansprakelijkheid is opgenomen. De
algemene voorwaarden worden u op verzoek kosteloos toegezonden.
=====================================================================
The information contained in this communication is confidential and is
intended solely for the use of the individual or entity to whom it is
addressed. You should not copy, disclose or distribute this communication
without the authority of Ernst & Young. Ernst & Young is neither liable for
the proper and complete transmission of the information contained in this
communication nor for any delay in its receipt. Ernst & Young does not
guarantee that the integrity of this communication has been maintained nor
that the communication is free of viruses, interceptions or interference.

If you are not the intended recipient of this communication please return
the communication to the sender and delete and destroy all copies.

In carrying out its engagements, Ernst & Young applies general terms and
conditions, which contain a clause that limits its liability. A copy of
these terms and conditions is available on request free of charge.
=====================================================================





--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  INET: nlzanen1_at_EY.NL

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_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).
Received on Fri Sep 07 2001 - 04:46:47 CDT

Original text of this message

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