Vol. I · No. 47 Saturday, 21 November 2026 Wah Cantt, Pakistan
Oracle with Hassan

Tools & Plugins · Free tool

DBMS_SCHEDULER interval builder — repeat_interval without guesswork.

Describe the schedule, get the calendar string, and see the next run times before you create the job. Or paste a repeat_interval you already have and check what it really does.

Checked against DBMS_SCHEDULER.EVALUATE_CALENDAR_STRINGOver 1,000 schedules comparedRuns in your browser

Days

At hour(s)

Next 10 runs

    Ready to paste

    Examples

    How repeat_interval works

    repeat_interval uses Oracle's calendaring syntax: clauses separated by semicolons, starting with FREQ. The frequency sets the cycle; every BY clause narrows the days and times inside each cycle. FREQ=WEEKLY;BYDAY=MON,FRI means "each week, on Monday and Friday".

    Anything you leave out is taken from the job's start_date. FREQ=DAILY on its own runs at the start date's time of day; FREQ=MONTHLY runs on the start date's day of the month. That is the most common surprise: a job whose start date is 14:37:22 with FREQ=DAILY;BYHOUR=2 runs at 02:37:22 — unless you also give BYMINUTE=0;BYSECOND=0. The builder always writes them out.

    The same applies to short intervals. FREQ=MINUTELY;INTERVAL=10 counts from the start time, so a job started at 14:37:22 runs at 14:47:22, 14:57:22 and so on. For runs on the clock — :00, :10, :20 — list the minutes instead: FREQ=HOURLY;BYMINUTE=0,10,20,30,40,50;BYSECOND=0. The builder does this whenever the interval divides an hour evenly.

    INTERVAL counts from the start date

    INTERVAL=2 means every second cycle, counted from start_date — not from today, and not from the 1st of the month. For "every other Friday", the start date decides which Fridays: start the job in the right week. Change the "from" date in the tool to see the effect.

    Clause reference

    ClauseValuesWhat it does
    FREQYEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, SECONDLYRequired. The base cycle.
    INTERVAL1–99Run every n-th cycle: INTERVAL=2 with WEEKLY is every other week. Counted from the start date.
    BYMONTH1–12 or JAN–DECOnly these months.
    BYMONTHDAY1–31, or -1 for the last dayDays of the month. -1 is the last day, -2 the day before.
    BYDAYMON–SUN, optionally numberedDays of the week. In MONTHLY rules, 1MON is the first Monday and -1FRI the last Friday; in YEARLY rules the number counts within the year.
    BYHOUR / BYMINUTE / BYSECOND0–23 / 0–59 / 0–59Times of day. Leave one out and the start date fills it in.
    BYYEARDAY1–366, or negativeDays of the year.
    BYWEEKNO1–53, or negativeISO week numbers (weeks start on Monday).
    BYSETPOSposition in each cyclePicks the n-th match of each MONTHLY or YEARLY cycle — e.g. the last weekday. Not allowed with WEEKLY, DAILY or shorter cycles (ORA-27424).

    Mistakes that make jobs run at the wrong time

    Test a schedule in your own database

    Oracle can list the next run dates itself, without creating a job:

    DECLARE
      l_next TIMESTAMP WITH TIME ZONE := SYSTIMESTAMP;
    BEGIN
      FOR i IN 1 .. 10 LOOP
        DBMS_SCHEDULER.EVALUATE_CALENDAR_STRING(
          calendar_string   => 'FREQ=WEEKLY;BYDAY=MON,WED,FRI;BYHOUR=9;BYMINUTE=0;BYSECOND=0',
          start_date        => SYSTIMESTAMP,
          return_date_after => l_next,
          next_run_date     => l_next);
        DBMS_OUTPUT.PUT_LINE(TO_CHAR(l_next, 'Dy DD-Mon-YYYY HH24:MI:SS'));
      END LOOP;
    END;
    /

    This is exactly how the builder was tested: its results were compared with EVALUATE_CALENDAR_STRING on Oracle AI Database 26ai for over a thousand schedules, including every example on this page. For very unusual combinations of clauses, confirm with the block above.

    Questions developers ask

    How do I run a job every 5 minutes, only during office hours?

    FREQ=HOURLY;BYMINUTE=0,5,10,15,20,25,30,35,40,45,50,55;BYSECOND=0;BYHOUR=9,10,11,12,13,14,15,16,17;BYDAY=MON,TUE,WED,THU,FRI. List every hour and minute you want — the calendaring syntax has no ranges — and the runs stay on the clock whatever the job's start time. This one runs from 09:00 to 17:55.

    How do I schedule the last working day of the month?

    FREQ=MONTHLY;BYDAY=MON,TUE,WED,THU,FRI;BYSETPOS=-1 — take all weekdays of the month and keep the last one. Public holidays need an exclusion schedule.

    Can I still use a PL/SQL expression like SYSDATE + 1/24?

    Yes, repeat_interval also accepts a PL/SQL date expression, evaluated after each run. But an expression drifts by the job's run time, while calendaring syntax stays on a fixed grid. Prefer calendaring syntax for anything that must run at set times.

    Learn more: DBMS_SCHEDULER tutorial · Also on this site: Oracle Date Format Tester