Search code examples
c#asp.net.net-corecron-task

How to run cron job every day in asp. Net core application?


I have a web application written in asp. Net mvc core 2.2. O need to run a schedule job every day at 3:00 Am. What is the best way to do it?

I tried hangfire it stops after some time. We need to set IIS server always running. I googled and found hosted service in. Net core. Can anyone tell me what is the best approch to run a job daily in web application in dot net core?


Solution

  • I've not personally tried it for .NET Core honestly, but have you tried Quartz Scheduler? https://www.quartz-scheduler.net/

    [UPDATE]: According to Quartz GitHub repo: "Quartz.NET supports .NET Core/netstandard 2.0 and .NET Framework 4.6.1 and later."