I am planning to create a utility, which will query the database and store some information (on another table in the database). Its a multi-threaded utility and require to run for every 5 or 10 minutes/later may be thrice in a day.

5 Answers
5

Comments from a colleague of mine from yesterday regarding this very same topic

"there is always going to be a varied opinion on this one... My rule of thumb would be if you need something that runs every five minutes (and you dont care what time it runs or how long a run takes) or something that responds to events, use a service. If you need something to run at a particular time each day and you are sure that there will not be an over lap, use the Scheduler provided with the OS. If you need a hybrid, either use both solutions for the varying cases or find something off the shelf. (Possibly Quartz .Net) "

Personally, I agree with my colleague on this one. Keep it simple for as long as possible. And if you are deploying to Win2008 server, check out the Task scheduler and all the features the standard scheduler offers. For me, the killer was to start a scheduled task when an event occurs.

I've heard the arguments for using Windows Scheduler but have always opted for writting my app as a service. At first I thought it would be a better solution in a clustered environment but that's not really true. The bottom line is I didn't have a good reason other than it "felt" like better design.

why don't you try Quartz.neti used it once and i can say it's a powerful framework to create you own scheduler, and it provide a pre builded Service that will run your scheduled Job's (stored in database or just in a XML file)
http://quartznet.sourceforge.net/

If you want the user to have more control without you having to build it, use the Task Scheduler. Looks like Google does this with their apps update. Depending on the user, it's not difficult manage the task. Take the user out of the loop and create a service. Most people will never touch them.