Scheduling Web Api method to run on set intervals

后端 未结 4 2417
夕颜
夕颜 2021-02-20 00:58

In my current project there is a need to schedule a method to run at set intervals e.g. once a week, and currently this is done via a windows service creating an HttpClient and

4条回答
  •  不要未来只要你来
    2021-02-20 01:32

    This is not something you want the Web API to do, and I don't think it does. Something about single responsibilities.

    What is wrong with the service approach? You may also want to take a look at Windows Task Scheduler.

提交回复
热议问题