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

Home -> Community -> Usenet -> c.d.o.misc -> Re: status_table

Re: status_table

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 02 Jun 2006 15:13:21 -0700
Message-ID: <1149286402.881140@bubbleator.drizzle.com>


swapna.marri_at_gmail.com wrote:
> Hi All,
>
> I have a Job_status_table which will keep track of the status of the
> cron jobs.I built one procedure where in, it logs on the start-time,
> end_time, job_name,status_flag of all the cron jobs when executing.When
> the script(job) fails, it will not put the end_time and marks the
> status_flag as 'N'.
>
> Now I would like to create a procedure that checks our job_status table
> to look for any abended or hung jobs ( we'll need to make sure to
> make allowances for active jobs so probably just look for records with
> an hour or so ago start time/date but no end time/date). Once we have
> a procedure like this we can call we can schedule it in cron to run
> every 5 minutes or so.
>
> Help is appreciated,
> Thanks,
> Choti

What version of Oracle?

It seems you are reinventing the wheel. If in 9i or before look at DBMS_JOBS. If in 10g at DBMS_SCHEDULER. Demos of both can be found in Morgan's Library at www.psoug.org.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Jun 02 2006 - 17:13:21 CDT

Original text of this message

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