Here are some examples of Calendar type instructions to schedule job executions for the Oracle dbms_scheduler scheduler:
Replace line repeat_interval with the desired repeat interval.
BEGIN
sys.dbms_scheduler.create_job( job_name => ‘”SYSTEM”.”TEST”‘,
job_type => ‘PLSQL_BLOCK’,
job_action => ‘begin
— Insert PL/SQL code here
end;’,
repeat_interval => ‘FREQ=YEARLY; BYDATE=0715;’,
start_date => systimestamp at time zone ‘Europe/Paris’,
job_class => ‘”DEFAULT_JOB_CLASS”‘,
auto_drop => FALSE,
enabled => TRUE);
END;
/
Every day, monday to friday at 8PM
FREQ=DAILY; BYDAY=MON,TUE,WED,THU,FRI; BYHOUR=20; BYMINUTE=0; BYSECOND=0;
Every hour
FREQ=HOURLY;INTERVAL=1;
Every 5 minutes
FREQ=MINUTELY;INTERVAL=5;
Every monday at 10AM:
FREQ=DAILY; BYDAY=MON; BYHOUR=10; BYMINUTE=0; BYSECOND=0;
FREQ=WEEKLY; BYDAY=MON; BYHOUR=10; BYMINUTE=0; BYSECOND=0;
FREQ=YEARLY; BYDAY=MON; BYHOUR=10; BYMINUTE=0; BYSECOND=0;
One Monday out of two:
FREQ=WEEKLY; INTERVAL=2; BYDAY=MON;
Every monday on week 3, 6 et 9 every year:
FREQ=YEARLY; BYWEEKNO=3,6,9; BYDAY=MON;
Last day of the month:
FREQ=MONTHLY; BYMONTHDAY=-1;
Beofre last day of every month:
FREQ=MONTHLY; BYMONTHDAY=-2;
15 July:
FREQ=YEARLY; BYMONTH=JUL; BYMONTHDAY=15;
FREQ=YEARLY; BYDATE=0715;
Every 1,2,3,4 andet 5 february:
FREQ=YEARLY; BYDATE=0201,0202,0203,0204,0205
FREQ=YEARLY; BYDATE=0201+SPAN:5D;
Every 10 days:
FREQ=DAILY; INTERVAL=10;
Very day at 16h15, 17h15 and 18h15:
FREQ=DAILY; BYHOUR=16,17,18; BYMINUTE=15; BYSECOND=0;
Every 15, one month out of two:
FREQ=MONTHLY; INTERVAL=2; BYMONTHDAY=15;
Every 17 of each month:
FREQ=MONTHLY; BYMONTHDAY=17;
Second Thursday of each month:
FREQ=MONTHLY; BYDAY=2THU;
Last Thursday of the month:
FREQ=YEARLY; BYDAY=-1THU;
Every 40 hours:
FREQ=HOURLY; INTERVAL=40;
Last day of the month one month out of two:
FREQ=MONTHLY; INTERVAL=2; BYMONTHDAY=-1;
Every hours the two first day of the month:
FREQ=HOURLY; BYMONTHDAY=1,2;
Run the 60th and 120th day of the year:
FREQ=YEARLY; BYYEARDAY=60,120;
Monday to Friday the last day of work of the month:
FREQ=MONTHLY; BYDAY=MON,TUE,WED,THU,FRI; BYSETPOS=-1