Preforming scheduled tasks in C# .NET MVC Application

后端 未结 4 852
礼貌的吻别
礼貌的吻别 2020-12-17 06:18

I\'m trying to implement a logic for my .NET MVC application where I would trigger scheduled tasks in my application on a following basis:

First scheduled ta         


        
4条回答
  •  长情又很酷
    2020-12-17 07:04

    For scheduling tasks in ASP.NET MVC you have several options:

    • 3rd party libraries like FluentScheduler, HangFire or Quartz.net.
    • Since .Net 4.5.2 there is QueueBackgroundWorkItem, a native way to schedule work in the background. Here is a guide on how to use it with ASP.NET MVC.
    • Azure services for background workloads and scheduled tasks. There are a couple of those aimed at different tasks, here is an overview of them.

    Be careful if you try to implement a custom solution yourself, as any exception in a thread not associated with a request would halt the entire process.

提交回复
热议问题