Call (800) 766-1884 for Oracle support & training
Free Oracle Tips

Oracle Consulting Support
Oracle Upgrades
Use New Oracle Features
Oracle Replication Support
Oracle Training
Remote Oracle DBA
System Documentation
Oracle Tips
Oracle Performance

Free Oracle Tips



BC Oracle tuning

Oracle training

Oracle support

Remote Oracle



  Oracle Tips by Burleson

Oracle Job Scheduling

Chapter 3 - Time-Based Job Scheduling

Calendar Syntax in Oracle10g




Specifies the day or days of the week with reference to the frequency using the three letter abbreviation. When used with a yearly or monthly frequency, the day can be prefixed with a number.  Prefixing the day with a number indicates the occurrence of that number within the frequency, with negative numbers providing a backwards count.

SQL> -- Run on the thirty fifth Monday of the year.
SQL> exec test_calendar_string('freq=yearly; byday=35MON');

Next Run Date: 30-AUG-2004 03:04:32
Next Run Date: 29-AUG-2005 03:04:32
Next Run Date: 28-AUG-2006 03:04:32
Next Run Date: 27-AUG-2007 03:04:32
Next Run Date: 01-SEP-2008 03:04:32

PL/SQL procedure successfully completed.

SQL> -- Run on the second Monday of the month.
SQL> exec test_calendar_string('freq=monthly;
Next Run Date: 12-JAN-2004 03:04:32
Next Run Date: 09-FEB-2004 03:04:32
Next Run Date: 08-MAR-2004 03:04:32
Next Run Date: 12-APR-2004 03:04:32
Next Run Date: 10-MAY-2004 03:04:32

PL/SQL procedure successfully completed.

SQL> -- Run on the last Wednesday of the month.
SQL> exec test_calendar_string('freq=monthly; byday=-1WED');
Next Run Date: 28-JAN-2004 03:04:32
Next Run Date: 25-FEB-2004 03:04:32
Next Run Date: 31-MAR-2004 03:04:32
Next Run Date: 28-APR-2004 03:04:32
Next Run Date: 26-MAY-2004 03:04:32

PL/SQL procedure successfully completed.

The above text is an excerpt from:

Oracle Job Scheduling
Creating Robust Task Management with dbms_job and Oracle10g dbms_scheduler

ISBN 0-9744486-6-4

by Dr. Timothy S. Hall

Download your Oracle scripts now:

The definitive Oracle Script collection for every Oracle professional DBA


Oracle performance tuning software 

Oracle performance tuning book


Oracle performance Tuning 10g reference poster
Oracle training in Linux commands
Oracle training Excel
Oracle training & performance tuning books



Copyright © 1996 -  2014 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.