If we need to write a program that works periodically, which way do we prefer?
Writing a windows service or writing a console application which works as scheduled task?
If we need to write a program that works periodically, which way do we
Share
I would suggest running the process as a scheduled task if you can, and writing a service only if you need to. Services are quite a bit more difficult to write (correctly), and if you’re running your process on a schedule of any sort, you’re much better off using the windows scheduler than attempting to build a scheduler of your own (within the servce).
If you’re trying to decide between the two, then obviously using the Task Scheduler is a viable option. And if using the Task Scheduler is a viable option, then building a service is almost certainly the wrong choice.