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;
/
Recent changes RSS feed Creative Commons License Donate Minima Template by Wikidesign Driven by DokuWiki