backgroundworker-hangfire
Is there an existing issue for this?
- [x] I have searched the existing issues
Description
In the development environment, repeatedly starting the service causes Hangfire initialization to hang, leading to service startup failure. In the Service, I injected the background worker with dependency injection:
Reproduction Steps
No response
Expected behavior
No response
Actual behavior
No response
Regression?
No response
Known Workarounds
No response
Version
9.0.0
User Interface
Common (Default)
Database Provider
EF Core (Default)
Tiered or separate authentication server
None (Default)
Operation System
Windows (Default)
Other information
No response
In the Service, I injected the background worker with dependency injection:
await _notificationWorker.StopAsync();
// Modify the scheduled task expression _notificationWorker.CronExpression = Cron.Weekly((System.DayOfWeek)input.Weekly, input.SendTime.Hours, input.SendTime.Minutes);
// Restart the worker await _notificationWorker.StartAsync(); When changing the execution time as above, it works fine the first time, but subsequent attempts result in a StoppingTokenSource error.
hi
- Reproduction Steps
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.