I'm trying to add a scheduling feature to my web scraping application that will let the user schedule scraping jobs so he can, for instance, perform a job every Monday, or every 2 hours or stuff like that.
On one end, I could make a very simple scheduler that let you pick a specific date and time and pick a time interval that would indicate how often to execute the job starting at the specified date and time. So if, for instance, I pick Dec 31 at 2:00 pm and choose 1 day as my interval, the job would run every day at 2:00 pm starting Dec 31. But what if he wants to run the job every Saturday and Sunday, or three times a day on Sundays?
On the other end, I could embed some kind of scripting language that will let the user use any logic he wants, but this would be overkill for me and for the user. He doesn't need to run a job every day of the month that is prime number or anything like that.
So this is a common sense question, not a programming one. How would you implement this, or, do you know any similar kind of scheduling job in any other kind of application? I looked at the scheduler in my antivirus but this one is extremely plain and simple.