Skip to content

How do you schedule a recurring background job (like a migration/import job) to run only on specific days of the week, every hour, rather than a plain daily or hourly schedule?

Answer

Use an Oracle calendaring expression for the schedule, combining FREQ, BYDAY, and time-of-day qualifiers — for example, FREQ=HOURLY; BYDAY=TUE,WED,THU,FRI; BYMINUTE=0; BYSECOND=0; runs the job every hour on the clock, but only on Tuesday through Friday. Before committing to a schedule string, you can preview what it will actually produce using DBMS_SCHEDULER.EVALUATE_CALENDAR_STRING in a small PL/SQL block that loops over the next several occurrences and prints each resulting run time, which is a useful sanity check before relying on a calendar expression you haven't used before.

← Browse Workflows and automation questions