Site Tools


Hotfix release available: 2026-07-14a "Mort". upgrade now! [57.1] (what's this?)
New release available: 2026-07-14 "Mort". upgrade now! [57] (what's this?)
Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum". upgrade now! [54.2] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
scheduler:showing_dates_in_a_schedule

You can use the following code to show what dates are in a schedule or a repeat_interval. The procedure prints out dates in a particular schedule or repeat_interval.

CREATE OR REPLACE PROCEDURE print_schedule_dates
 (
   schedule IN VARCHAR2,
   start_date IN TIMESTAMP WITH TIME ZONE DEFAULT dbms_scheduler.stime(),
   number_of_dates IN PLS_INTEGER DEFAULT 10
 )
IS
  date_after TIMESTAMP WITH TIME ZONE := start_date - INTERVAL '1' SECOND;
  next_date TIMESTAMP WITH TIME ZONE;
BEGIN
  FOR i IN 1 .. number_of_dates
  LOOP
    dbms_scheduler.evaluate_calendar_string
     (schedule, start_date, date_after, next_date);
 
    DBMS_OUTPUT.put_line(TO_CHAR(next_date,
                    'DY DD-MON-YYYY (DDD-IW) HH24:MI:SS TZH:TZM TZR'));
 
    date_after := next_date;
  END LOOP;
END;
/
scheduler/showing_dates_in_a_schedule.txt · Last modified: 2008/06/13 10:14 by smthng