diff --git a/LiteCharms.Features/Extensions/Quartz.cs b/LiteCharms.Features/Extensions/Quartz.cs index 28299e8..fe6103a 100644 --- a/LiteCharms.Features/Extensions/Quartz.cs +++ b/LiteCharms.Features/Extensions/Quartz.cs @@ -34,7 +34,7 @@ public static class Quartz storage.UseClustering(cluster => { cluster.CheckinInterval = TimeSpan.FromSeconds(30); - cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(20); + cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(90); }); }); }); @@ -62,6 +62,8 @@ public static class Quartz config.UseDefaultThreadPool(options => options.MaxConcurrency = 1); config.UseTimeZoneConverter(); + config.SetProperty("quartz.jobStore.misfireThreshold", TimeSpan.FromMinutes(2).TotalMilliseconds.ToString()); + config.UsePersistentStore(storage => { storage.PerformSchemaValidation = false; @@ -74,7 +76,7 @@ public static class Quartz storage.UseClustering(cluster => { cluster.CheckinInterval = TimeSpan.FromSeconds(30); - cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(20); + cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(90); }); }); }); diff --git a/LiteCharms.Features/Quartz/JobOrchestrator.cs b/LiteCharms.Features/Quartz/JobOrchestrator.cs index ed90adf..7873683 100644 --- a/LiteCharms.Features/Quartz/JobOrchestrator.cs +++ b/LiteCharms.Features/Quartz/JobOrchestrator.cs @@ -52,7 +52,7 @@ public class JobOrchestrator(ISchedulerFactory schedulerFactory) : IJobOrchestra .WithIdentity(triggerKey) .WithDescription($"Scheduled via Main Job at {now:g} UTC") .WithCronSchedule(cronExpression, cron => cron - .WithMisfireHandlingInstructionFireAndProceed()) + .WithMisfireHandlingInstructionIgnoreMisfires()) .StartAt(now) .Build();