HangfireIO / HangfireIO/Hangfire
RecurringJob Are Always Pending
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
I'm using Hangfire to run a few Recurring Jobs that needs to be executed every period of time.
Registration:
``` C#
RecurringJob.AddOrUpdate(
job => job.Execute(null), // async method
"NCRON expression");
```
Configuraitons :
``` C#
GlobalConfiguration.Configuration
.UseSqlServerStorage(hangFireConfig.StorageConnection)
.UseTagsWithSql()
.UseConsole(new ConsoleOptions
{
BackgroundColor = "#9E9E9E",
ExpireIn = TimeSpan.FromHours(8),
PollInterval = 1000,
TextColor = "#212121",
TimestampColor = "#3F51B5"
});
// filters
GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute
{
Attempts = 0,
OnAttemptsExceeded = AttemptsExceededAction.Fail
});
```
The Issue I'm facing is once the job is finished they always are in a pending state which stop the next execution no matter if an exception was thrown or not.
I tried to set manually the state with a IElectStateFilter setting `CandidateState` however it is not working...
Is there something I missing ?
Thanks a lot
Contributor guide
Assessment
This issue has not been assessed yet.