Windows Service or Task Scheduler for maintenance tasks?

前端 未结 6 1538
一生所求
一生所求 2020-12-31 22:41

I have a C# Application that does some maintenance tasks. It needs to run roughly every hour, although it\'s not too important if it\'s a bit off. And it has to run on a Win

6条回答
  •  一向
    一向 (楼主)
    2020-12-31 23:17

    I prefer the Task Scheduler myself, as it is easier to maintain and make changes to the schedule if you need to.

    Also, utilities that run continuously and "sleep" run the risk of causing problems if the developer "forgets" to do things like close connections, files etc. which can build up over time. Having the program "run and exit" is an extra safety blanket. :-)

提交回复
热议问题