How do I make sure only 1 Hangfire Server is running?

Hi,

I notice whenever I rebuild my solution, I got multiple HF server running (in my development env). Is there a way to make sure HF server only running on specific port? Or kill any other HF server before I start a new one. My goals is to have only one HF server.

1 Like

I have similar issue then run “always on” owin web app hosting Hangfire - two server instances.
This is because two places, where BackgroundJobServer instantiated - in HangfireBootstrapper and Startup (app.UseHangfireServer(options)).
If I delete BackgroundJobServer instantiation from HangfireBootstrapper app stopped to be always on.