Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DBMS_SCHEDULER - Second Working Monday Each Month

wowlApr 17 2023 — edited Apr 17 2023

Hi,

I'm trying to set up a DBMS_SCHEDULER that runs on the second working monday of each month.

I've created a schedule that has all the UK public holidays called “public_holidays_england” which seems to work as expected so I'm using this as the repeat interval

'freq=monthly; byday=2mon; exclude=public_holidays_england; bysetpos=1'

If it was the first working Monday then it would work fine but as its the second working Monday then it doesn't seem to take into account that the first Monday is not a working day.

So for Jan 2024 the above repeat interval returns “MONDAY 08-JAN-2024” but i want it to return “MONDAY 15-JAN-2024”

Below is a calendar showing the days circled I want returned, the days in red are public holidays from the “public_holidays_england” schedule

Any ideas what I need to do.

Thanks in advance.

This post has been answered by mathguy on Apr 17 2023
Jump to Answer
Comments
Post Details
Added on Apr 17 2023
2 comments
905 views