Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Job occasionally not running as expected.
To be really sure, I would modify "what" for this job, i.e.:
BEGIN insert into job_log(message, job_date) values('start', sysdate);
manhatten_com.poll_label; insert into job_log(message, job_date)
values('start', sysdate); END;
Thus, job_log table (obviously should be created) will show you actuall start/end times of each execution, and you don't have to poll dba_jobs.
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Stuart Clowes
Sent: Friday, July 14, 2006 11:13 AM
To: oracle-l_at_freelists.org
Subject: Re: Job occasionally not running as expected.
Instead of DBA_JOBS_RUNNING, I've relied on 'THIS_DATE' being not null to indicate that my job is running. This suggests that the job finished in a short time. This is supported by some logging we perform at the start and end of our procedure (not shown).
I will add DBA_JOBS_RUNNING to my observations, to see if this agrees with THIS_DATE being null.
Job is running:
WHAT
BEGIN manhatten_com.poll_label; END;
14-JUL-2006 12:50:31 14-JUL-2006 12:50:34 14-JUL-2006 12:50:36 EXECUTING
.... job finishes (I think) as THIS_DATE is now NULL. Next_date is set
to three seconds in the future.
BEGIN manhatten_com.poll_label; END;
14-JUL-2006 12:50:36 14-JUL-2006 12:50:39
.... and finally, it appear to have executed again. (I didn't capture it
executing, as it is quick).
WHAT
BEGIN manhatten_com.poll_label; END;
14-JUL-2006 12:54:01 14-JUL-2006 12:54:04
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Jul 14 2006 - 11:48:47 CDT
![]() |
![]() |