Hi, i’ve found different threads about this argument but no solution…
When i stop Hangfire (for example during publish), i want that it continues to execute current jobs until they ends, for example giving a maximum of 2 minutes.
Hangfire run on a IHostedService in .NET 6
I’ve tried with:
- .Server.WaitForShutdown(new TimeSpan(0, 2, 0)); // it always wait 2 minutes, not what i waant
- .Server.Dispose(); (setting “StopTimeout” to 2 minutes) // But after 15 seconds Hangfire it’s stopped.