How to set an infinite BackgroundJobServerOptions.ServerTimeout or disable it?


#1

I am required to create a hangfire server that never times out. I’m assuming that the ServerTimeout option is what I should be looking at to do this, but cannot find any documentation on how to either set the timeout period to an infinite length or disable the timeout code.

Can someone either point me towards documentation that describes this or explain it here?

Thanks in advance.


#2

P.S. Would passing an infinite timespan work? https://docs.microsoft.com/en-us/dotnet/api/system.threading.timeout.infinitetimespan?view=netframework-4.8