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

umer picture umer · Apr 22, 2020 · Viewed 9.9k times · Source

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?

Answer

Siavash Mortazavi picture Siavash Mortazavi · Apr 22, 2020

I've not personally tried it for .NET Core honestly, but have you tried Quartz Scheduler? https://www.quartz-scheduler.net/ By this article, it seems you can use it with .NET Core as well