I believe that HangFire is still executing even the browser is close, but need someone to verify this if it behave like that.
If you have a scheduled or recurring job, yes. I have multiple nightly recurring jobs that go off to handle DB tasks. I have scheduled tasks that I kick off if I need to do a long running task based on certain scenarios and criteria.
Hangfire will keep processing as long as the relevant BackgroundJobServers are still running. Either on IIS or as a part of a Windows Service you built to run them.
The browser only connects to the Dashboard which is nothing more than a monitoring/management tool and does no processing of jobs at all.
I am seeing the same issue. (I understand that when you run hangfire in IIS or windows service that is expected behavior) but this issue is while debugging application in visual studio. I have Web API application in which hangfire is configured. Visual Studio 2017 is configured to use IIS Express
Here are the steps
1>In VS start the web api application in debugging mode
2>Browse the hangfire dashboard as http://localhost:portnumber/hangfire
3>Do your testing
4> Now stop the visual studio debugging, this will close the browser also
5>Now open browser again( without using VS debugging) and type http://localhost:portnumber/hangfire
6>I see the hangfire is still running even though application is not running in visual studio
I think you might have to stop or cycle IIS Express to get Hangfire server to stop. I’ve not tested this because I’m running on regular IIS for dev.