dbms_scheduler calender syntax (repeat_interval)
mafaizJun 28 2011 — edited Oct 5 2011Hi,
I have scheduled my logon job using dbms_scheduler.
atually what my scheduler job doing is, it check the previous day logon users who had been accesing the particular schema,and the dbms_scheduler job will send mail to DBA team.
Actually in my scheduler job it send mail to dba from MON to SAT everyday.
But here my task is ,
*1)How do i restrict sending mail only on "the second and third saturday of every month."?*
*2)On Monday job the scheduler will check only on previous day i.e sunday(sysdate-1).But how do i change monday job to be check previous working day and holidays(i.e.,friday+holidays (sat,sund).?*
*3)How to restrict sending scheduled mail on "PUBLIC HOLIDAYS"?*
For information,here below i post my create schedule program:
BEGIN
DBMS_SCHEDULER.create_schedule (
schedule_name => 'test_daily_schedule',
start_date => SYSTIMESTAMP,
repeat_interval => 'freq=daily;byday=MON,TUE,WED,THU,FRI,SAT;byhour=10;byminute=5',
end_date => NULL,
comments => 'Repeats daily, on the hour, for ever.');
END;
/
Looking for helpful answers
Thanks in advance.