I have hangfire running on a farm (2 servers) and 5 recurring jobs that should not run at the same time or overlap each other.
I've scheduled them with "enough" time between, but I don't want the next job to start if the previous is still running because it's taking longer than expected.
I've tried to accomplish this by setting up a single queue and only one worker process, so that hangfire does not pick up the following job until the current job completes. But as we have 2 servers, each has it's own workers, so the following job is executed by the other server at the same time.
Is there a way to tell hangfire to use only one "worker" for all the farm so that each jobs waits for the previous to complete? I could achieve this by registering in hangfire only one server, but I wold like to keep both for availability reasons.