Differences
This shows you the differences between two versions of the page.
| — |
code:scheduler:showing_dates_in_a_schedule [2008/05/14 15:54] (current) smthng created |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Showing dates in a Schedule ====== | ||
| + | This code fragment can be used to see what dates a particular schedule or repeat interval will generate. It can be used to test schedules without having to schedule a job. | ||
| + | |||
| + | <code plsql> | ||
| + | create or replace procedure print_schedule_dates | ||
| + | ( | ||
| + | | ||
| + | | ||
| + | | ||
| + | ) | ||
| + | is | ||
| + | date_after timestamp with time zone := start_date - interval ' | ||
| + | next_date timestamp with time zone; | ||
| + | begin | ||
| + | for i in 1 .. number_of_dates | ||
| + | loop | ||
| + | dbms_scheduler.evaluate_calendar_string | ||
| + | | ||
| + | |||
| + | 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; | ||
| + | / | ||
| + | </ | ||