Home » RDBMS Server » Server Administration » Query - Evaluating Inteval parameter in DBMS_JOB (Oracle 9i R2 on RHEL 4)
Query - Evaluating Inteval parameter in DBMS_JOB [message #304190] Tue, 04 March 2008 08:23 Go to next message
orasaket
Messages: 70
Registered: November 2006
Member
Hi,

I have a query regarding Oacle 9i dbms_job.

I have Scheduled a job to execute daily at 21:30 with following expression

DBMS_JOB.SUBMIT(
job => :jobno ,
what => 'batch_process_prc;',
next_date => TRUNC(sysdate)+21.50/24,
interval => 'TRUNC(SYSDATE+1)+21.50/24'
);

Now say if the job execution start at 21:30 on Monday and goes beyond 21:30 of tuesday to finish at 22:30 of Tuesday
What will happen to the jobs' 'scheduled execution' on Tuesday?
Will it execute immediately at 22:30 once the execution started on monday finishes?

And what could be concluded about next_date evaluation from it.
Does it happen before job execution starts?Or after Job Execution is completed?

Thanks and Regards,
OraSaket
Re: Query - Evaluating Inteval parameter in DBMS_JOB [message #304201 is a reply to message #304190] Tue, 04 March 2008 08:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Who is silly enough to schedule a job with a higher frequency than it lasts?

The best way to know is to try, doesn't it?

Regards
Michel
Re: Query - Evaluating Inteval parameter in DBMS_JOB [message #304213 is a reply to message #304190] Tue, 04 March 2008 09:57 Go to previous messageGo to next message
orasaket
Messages: 70
Registered: November 2006
Member
Michel,

2 things here..

1)
when people ask such things definitely they have some constraints in the environment they are working. Evrything is not available or permitted to everybody, everywhere. Do you agree on this?

2)
It's not silly Scheduling -since a job might not finish executing before its next scheduled run.
E.g. if the batch job I exampled is scheduled to execute at 21:30 on saturday and sunday and it could not complete till Sunday 21:30, because something went too slow in between or some backup started in between etc. etc. nobody will be there to monitor on Sunday evening.

My question was on that context.

Hope it is clear now.

Regards,
OraSaket
Re: Query - Evaluating Inteval parameter in DBMS_JOB [message #304217 is a reply to message #304213] Tue, 04 March 2008 10:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1) It was not a personal remark, it is just a general one. I should add a big SIGH!

2) If this can happen, do not schedule in a regular basis, make your procedure schedules the next time.

Regards
Michel
Re: Query - Evaluating Inteval parameter in DBMS_JOB [message #304316 is a reply to message #304190] Tue, 04 March 2008 18:30 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8636
Registered: November 2002
Location: California, USA
Senior Member
The next run date, based on the provided interval, is calculated when the job is run, not when it finishes. So, if you start your job on Monday at 21:30 and your interval is TRUNC(SYSDATE+1)+21.50/24, then your next scheduled job is on Tuesday at 21:30. However, it will not start the next job until the previous job is finished. So, the next job will begin immediately after the previous job is finished at 22:30 on Tuesday, just as you suspected.



Re: Query - Evaluating Inteval parameter in DBMS_JOB [message #305410 is a reply to message #304190] Mon, 10 March 2008 12:50 Go to previous message
OraKaran
Messages: 183
Registered: March 2008
Location: United Kingdom
Senior Member
Barbara,

Thank you very much


Best Regards,
OraSaket
Previous Topic: Raw disk / partition from Filer (FAS-940)
Next Topic: UTF8 character set conversion
Goto Forum:
  


Current Time: Sun Dec 11 04:24:56 CST 2016

Total time taken to generate the page: 0.06693 seconds