Hangfire job keep running ever after I stop my MVC site

Hi there, We just come across this awsome tool hangfire, and decided to use it. I have created a small POC in Asp.Net Mvc, and created a Recurring job that will execute after every minute.

Now the problem is that even if I stop my site the job keeps executing after every minute, and to stop the job I manually have to delete t using dashboard.

Is this behaviour as expected? Where the hangfire server is actually running from ? and how can I fix or control this.


Did you just stop the website? Try stopping the app pool.

Thanks Chad, I have even tried resetting the IIS server? But I guess it is the normal behaviour of Hangfire. This is what I found on Hangfir edocumentation -

Hangfire saves your jobs into persistent storage and processes them in a reliable way. It means that you can abort Hangfire worker threads, unload application domain or even terminate the process, and your jobs will be processed anyway (Getting Started — Hangfire Documentation)

If that is correct, my next question is that, what is the purpose of Background server Stop method? What does it actually do? I’ve called Background server Stop method anticipating that it should stop the scheduled jobs. but for no help :frowning: