'DotNet5 Hangfire microservice running on multiple servers

We have a microservice having hangfire scheduler deployed in multiple server environment. Currently the hangfire gets triggers from all 3 servers simultaneously resulting in duplication of process on all 3 servers. Is there any way to restrict the hangfire job to be execute only on 1 server at a time?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source