HangfireIO / HangfireIO/Hangfire

Same recurring job executes on all servers

Open
#1,852 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.1k
Forks
1.8k
Avg merge
1h 19m
Merged PRs (30d)
1

Description

I was under the impression that recurring jobs or any job is processed only once from one of the servers, rather than all processing at the same time.

Please see from logs that the same jobs are executed across servers at the same time almost:
![image](https://user-images.githubusercontent.com/2631639/115800745-1782d380-a390-11eb-8009-bb8e986c25c3.png)

Why is that? And how to prevent this?

And here is the definitions:
![image](https://user-images.githubusercontent.com/2631639/115800846-3da87380-a390-11eb-8f97-18ffd73d93dc.png)

We cannot tolerate same jobs running across servers, especially at the same time.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the server logs with the recurring-job definitions shown in the issue, focusing on whether the same schedule is registered across servers. Review the project's recurring-job and multi-server processing behavior to identify the expected coordination mechanism. Done means explaining why duplicate execution occurs and documenting a verified way to prevent it.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.