Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

DBMS_SCHEDULER repeat_interval question ...

garywickeDec 1 2016 — edited Dec 1 2016

Environment

Oracle 11.2.0.4 EE on Solaris

I have a DBMS_SCHEDULER job created to run a small shell script that I want to run every five (5) minutes.

I initially set the REPEAT_INTERVAL up as:

repeat_interval => 'FREQ=DAILY; BYMINUTE=00,05,10,15,20,25,30,35,40,45,50,55'

However as I was monitoring the executions from DBA_SCHEDULER_JOBS I noticed that after it executed the job at the 55th minute the NEXT_RUN_DATE would show the next day at the 00th minute of the same hour instead of the same day at the 00th minute of the next hour.

Well that was confusing enough so here's an example:

If the LAST_START_DATE was 01-Dec-2016 13:55:11 the NEXT_RUN_DATE would show 02-Dec-2016 13:00:11 instead of 01-Dec-2016 14:00:11.

I observed this several times.

I 'fixed' the issue by adding the BYHOUR parameter and specifying every hour of the day 0-23 but I didn't think that should have been necessary.

I've researched the REPEAT_INTERVAL format examples and documentation but have not come across this particular situation.

Is this working as designed?  If so, why would the repeat_interval not assume every hour of the day if the BYHOUR parameter was missing?

Any suggestions and better examples are most welcome.

-gary

This post has been answered by Pavan Kumar on Dec 1 2016
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 29 2016
Added on Dec 1 2016
4 comments
6,176 views