Hi all,
For a work project I am undertaking a task that will see me create a C#.NET Windows Service that will run 24/7. The program will essentially simply move files (based on a given path and a regex) between various locations - from/to HTTP, Network Paths and FTP. The administrator will schedule these jobs via an administration page in ASP.NET, where all jobs will be stored in a database. Seemingly the hardest part is scheduling these jobs - it is very simple to schedule tasks to run on a certain day at a certain time, but it also needs to be robust enough to allow tasks to run every day, every week day, every certain day of the month, or even every few seconds/minutes. I have concluded that the easiest way to store this scheduling information would be to use cron syntax (http://adminschoice.com/crontab-quick-reference) in the database.
The application has a timer to check the database for changes every 10 minutes, but the main issue I have is going about retrieving the tasks to be performed - I guess one option would be to simply retrieve everything every 10 minutes, and check each individual row to see if they are due to be performed. But I feel this is a very inefficient and technically lazy way - how would you guys go about this?
I know that Windows Scheduled Tasks would be a much easier way, but seems like my boss doesn't want that.
Thanks in advance to anyone that can offer some tips/advice.