I'm building functionality that will enable users to schedule recurring and non-recurring tasks. I need to save these schedules in the database and read active schedules once daily to see if they should be triggered today.
I am using spring/java. I fear if I write this logic myself it will be lacking and not as efficient as it could be.
Required schedule configurations are just like the Outlook calendar, except for being concerned with time. (probably easier to open outlook recurring meeting than read my rendition):
- Actual Date
- every Nth day, based on start date
- every Nth business day, based on start date
- every Nth week on one-to-many-selection(Sun,Mon,Tues,etc...), based on start date
- the (1st,2nd,3rd,4th,last) (Sun,Mon,Tues,etc...) of every Nth month based on start date
- day X of every y months, based on start date
- every (jan,feb,mar,apr,etc..) Nth day each year
- every (1st,2nd,3rd,4th,last) (Sun,Mon,Tues,etc...) of
(jan,feb,mar,apr,etc..)
What is simple pattern for implementing this? Thanks for any help