What is the equivalent to cron jobs in ASP.NET?

前端 未结 5 1138
面向向阳花
面向向阳花 2020-12-08 19:44

In PHP we have cron jobs, where the hosting server automatically picks up and executes a task as per the schedule given.

What would be a good alternative to use for

5条回答
  •  無奈伤痛
    2020-12-08 20:17

    Another option is to use hangfire which says about itself

    An easy way to perform background processing in .NET and .NET Core applications. No Windows Service or separate process required.

    Backed by persistent storage. Open and free for commercial use.

    Requirements (as of November 2019) are

    • .NET Framework 4.5
    • Persistent storage, e.g. an SQL database where Hangfire will write 10 tables
    • Newtonsoft.Json library ≥ 5.0.1

    Assuming that you have already some API project which runs as service, you can use hangfire within.

    Disclaimer: I am not affiliated in any kind with hangfire, I will just be using it soon.

提交回复
热议问题