Mega Code Archive

 
Categories / Oracle PLSQL / System Packages
 

Dbms_scheduler evaluate_calendar_string

SQL> SQL> DECLARE   2     l_start_date    TIMESTAMP;   3     l_next_date     TIMESTAMP;   4     l_return_date   TIMESTAMP;   5  BEGIN   6     l_start_date := TRUNC (SYSTIMESTAMP);   7     l_return_date := l_start_date;   8     FOR ctr IN 1 .. 10   9     LOOP  10        dbms_scheduler.evaluate_calendar_string  11                         ('FREQ=MONTHLY;INTERVAL=2',  12                          l_start_date,  13                          l_return_date,  14                          l_next_date  15                         );  16        DBMS_OUTPUT.put_line ('Next Run on: '|| TO_CHAR (l_next_date, 'mm/dd/yyyy hh24:mi:ss'));  17        l_return_date := l_next_date;  18     END LOOP;  19  END;  20  / PL/SQL procedure successfully completed. SQL> SQL>