Windows Service or Task Scheduler for maintenance tasks? -


I have a C # application that does some maintenance work. It needs to be run almost every hour, although it is not very important if it is a bit far away. And no one should be logged on to run it on Win2003 server.

Actually I wonder if I should write a Windows service, and if so, then the thread. Sleep () is a proper way to thread for one hour, or if there are better ways to ensure that the thread remains inactive and does not load any server? (Aka, what is the most opposite of spinlock)

The option is a Windows Task Scheduler, but I'm not sure if it is good for server use. Instead of config, I can not easily control the service through start / stop / restart and C) I do not know that Windows is safe as a user's credentials when I service it to MMC snapin.

What is your opinion? Is it possible for a wasteful service and is good or will you recommend the task scheduler instead?

You find this interesting interview with the responsible engineer for windows services and is good for service or work When will you go for In short, if your facility falls under the periodic maintenance category, go along with the work.


Comments