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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: