Windows Service to run a function at specified time

后端 未结 7 1861
一生所求
一生所求 2020-12-02 11:57

I wanted to start a Windows service to run a function everyday at specific time.

What method i should consider to implement this? Timer or using threads?

7条回答
  •  一整个雨季
    2020-12-02 12:09

    Use Windows built in Task Scheduler (http://windows.microsoft.com/en-us/windows7/schedule-a-task) or Quartz.net.

    Unless ... you have a service that's doing lots of other processing and needs to be running all the time in which case a Timer might be appropriate.

提交回复
热议问题