Category Archives: Uncategorized

Oracle Scheduler – Repeat Interval

Oracle’s scheduler offers a great deal of flexibility regarding when a particular job will run.  While I like the functionality, I don’t use it often enough to remember off the top of my head the specific variations.

The table below is more for me as a reference than anybody else, but I thought I would put it out here in case anybody finds it useful.  If you want any variations added, just add a comment.

The following are for the “repeat_interval” attribute in the scheduler.

Readable explanation

(all based on the start date of the job)

Code
Every day FREQ=DAILY; INTERVAL=1
Every Monday FREQ=WEEKLY; BYDAY=MON
Every 8 hours FREQ=MINUTELY; INTERVAL=480
Mon-Thur, 5 past the hours of 9am, 11am, 1pm, 3pm FREQ=DAILY; BYDAY=MON,TUE,WED,THU; BYHOUR=,9,11,13,15; BYMINUTE=05; BYSECOND=0;
Mon-Thur, 5 past the hour every hour between 7am and 6pm FREQ=DAILY; BYDAY=MON,TUE,WED,THU; BYHOUR=7,8,9,10,11,12,13,14,15,16,17,18; BYMINUTE=05; BYSECOND=0;
Mon-Thur, at 6am, 12pm, and 6pm FREQ=DAILY; BYDAY=MON,TUE,WED,THU; BYHOUR=6,12,18;
Daily at 5 past every hour FREQ=DAILY; INTERVAL=1; BYHOUR=5;
Mon-Thur at 12pm FREQ=DAILY; BYDAY=MON,TUE,WED,THU; BYHOUR=12; BYMINUTE=00
Every 2 hours FREQ=MINUTELY; INTERVAL=120

For more examples: http://awads.net/wp/2011/02/02/25-unique-ways-to-schedule-a-job-using-the-oracle-scheduler/

Advertisements

Knowledge

One of my favorite and most trusted sites for Oracle information is AskTom (http://asktom.oracle.com/). One of my favorite quotes I have read at least a hundred times is “I learn something new about Oracle every day”.  I wouldn’t say I learn something new every day, but this has been one of the more fruitful weeks in this regard.

As I spent about 20 minutes on the phone with one of our DBAs today, I realized how lucky I am to work in a place where others are willing to share what they know and answer questions.  I made a mental note to remember to do this with others when they ask the same of me.  In the spirit of “Thanksgiving”, I found myself thankful for having the time and flexibility to learn in my current job and I am thankful for those around me willing to teach.  I don’t care how impressed you are with yourself, there is always someone who can teach you.

I guess the message of this little post is to encourage the three people who read this blog to be willing to take the time to share what they know or learn with others.  When you create an environment that fosters sharing information instead of competition, everybody grows.  That being said… a little competition among the team members is healthy as well.