-
I am attempting to bootstrap Quartz.net in an asp.net core 3.1 app The configuration overwrites existing jobs and schedules. With the below config, it is overwriting the existing job/trigger, which resets the last PREV_FIRE_TIME. q.SchedulerId = "Scheduler-Core";
q.UseMicrosoftDependencyInjectionScopedJobFactory(options => { });
q.UseSimpleTypeLoader();
q.UsePersistentStore(config =>
{
config.UseSqlServer(Configuration.GetConnectionString("DataConnection"));
config.UseJsonSerializer();
}); I configure the Jobs q.AddJob<EmailReportJob>(job =>
job.WithIdentity(jobKey).WithDescription("Description").StoreDurably(true));
q.AddTrigger(t =>
t.WithIdentity("Trigger", JobGroup)
.ForJob("emailReportJob", JobGroup)
.StartNow()
.WithCronSchedule("0 48 14 ? * TUE *", x => x.WithMisfireHandlingInstructionFireAndProceed())); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Try adding following before services.AddSingleton(new QuartzSchedulingOptions
{
OverWriteExistingData = false,
IgnoreDuplicates = true
}); Please note that the configuration infrastructure will be tuned a bit in 3.2 it might require some changes then. But I'll try to make sure that how to do this is also documented. |
Beta Was this translation helpful? Give feedback.
Try adding following before
AddQuartz
:Please note that the configuration infrastructure will be tuned a bit in 3.2 it might require some changes then. But I'll try to make sure that how to do this is also documented.