Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS Job not running (time change)
DA Morgan wrote:
> David.E.M...._at_gmail.com wrote:
> > You say option D but how do I do this? The parameters in the dbms job
> > submit function are of type date. Is there a way to trick it to only
> > look at the seconds and not the hours and minutes?
> >
> > Anyway, I implemented option A, here it is:
> >
> > -- Check the get_run_summary job in the job queue for a bad
> > -- DBMS_JOB.NEXT_DATE which
> > -- could be the result of a time change. get_run_summary is scheduled
> > -- to run every 60 seconds so a bad date would be outside this range.
> > -- If the date is bad fix it.
> >
> > -- Retrieve the summarization job from the Oracle job queue schedule.
> > SELECT * INTO l_job_rec
> > FROM all_jobs WHERE what = 'get_run_summary;';
> >
> > -- If this_date is NOT NULL, it indicates the job is currently running.
> > -- If the job is running assume the date is good.
> > IF l_job_rec.this_date IS NULL THEN
> >
> > -- Get the next.date and check to see if it is > ( now + one minute )
> > -- If the next.date is > ( now + 1 minute ) then set it to now + 1 min
> > -- Ignore the case where the next_date is < sysdate because this job
> > -- is already backlogged with a high priority.
> >
> > IF l_job_rec.next_date > (sysdate+1/1440) THEN
> > -- Reschedule the summarization to run 1 minute from now.
> > DBMS_JOB.NEXT_DATE
> > (l_job_rec.job, sysdate+1/1440);
> > COMMIT;
> > END IF;
> > END IF;
> >
>
Ummm, elaborate please... Received on Thu Feb 09 2006 - 08:28:51 CST