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.
User friendly scheduling feature
design;scheduling
Why even do this at all? The operating system already has a scheduling service built-in (e.g. cron on *nix, Task Scheduler on Windows, etc). Just provide the ability to launch your process from the command-line launch and let the operating system take care of it.If you like, you could build a UI in your application that interfaces with the operating system's built-in mechanism to provide the most common configurations, but for anything more complicated, scheduling is basically a solved problem.