Open Broderick890 opened 10 months ago
Can confirm I'm running into the same issue.
Recurring Job is set to Cron.Minutely
Or
Using : .NET Core 8
builder.Services.AddHangfire(config =>
{
config.SetDataCompatibilityLevel(CompatibilityLevel.Version_180);
config.UseSimpleAssemblyNameTypeSerializer();
config.UseRecommendedSerializerSettings();
config.UseStorage(
new MySqlStorage(
connectionString,
new MySqlStorageOptions
{
JobExpirationCheckInterval = TimeSpan.FromHours(1),
CountersAggregateInterval = TimeSpan.FromMinutes(5),
PrepareSchemaIfNecessary = true,
DashboardJobListLimit = 25000,
TransactionTimeout = TimeSpan.FromMinutes(1),
TablesPrefix = "Hangfire",
QueuePollInterval = TimeSpan.FromSeconds(10)
}
)
);
});
While using QueuePollInterval = TimeSpan.Zero
The application is crashing with the error that this cannot be Zero
RecurringJob.AddOrUpdate<CheckStatus>(jobName, c => c.CheckHealthStatus(jobName), Cron.Minutely);
My config:
var options = new SqlServerStorageOptions { SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5), QueuePollInterval = TimeSpan.Zero };
builder.Services.AddHangfire(configuration => configuration.SetDataCompatibilityLevel(CompatibilityLevel.Version_180) .UseSimpleAssemblyNameTypeSerializer().UseRecommendedSerializerSettings() .UseSqlServerStorage(schedulerSetting.ConnectionString, options) .UseFilter(new AutomaticRetryAttribute { Attempts = 0 }) .UseFilter(new DisableConcurrentExecutionAttribute (schedulerSetting.ConcurrentExecutionTimeoutSeconds)) .UseSerilogLogProvider() );
Cron: "59 *"
hangfire version:
The program's local time is 4 seconds faster than the database; Each execution of the schedule is slower than the last time;Please help please.