HangfireIO / HangfireIO/Hangfire
Issues recurring job
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
Hi every one,
I am having an issue with my cron job for automatically sending email.
Firstly, As a user I set the time for the job to send an email every 50 minutes, starting 9.00am.
The job is working fine at 9.50am and I can receive an email.
The Next email is expected to be sent in the next 50 minutes. But the problem is:
At 10.00am, an email is sent. After that, 10.50am, an email is sent.
At 11.00am, an email is sent. After that, 11.50am, an email is sent.
`if (entity.Minute <= 59)
{
RecurringJob.AddOrUpdate($"RecurringNotAppear-{entity.Id}",
() => SendMail(entity), $"*/{entity.Minute} * * * *");
return;
}
`
Contributor guide
Research direction
Start with the RecurringJob.AddOrUpdate call and the cron expression */{entity.Minute} shown in the report. Reproduce the schedule for a 50-minute interval, then verify that the recurring job fires at the intended times rather than on the observed hourly pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100