Created CA follow up worker
This commit is contained in:
@ -28,6 +28,7 @@ builder.Services.AddScoped<ISmtpService, SmtpService>();
|
||||
builder.Services.AddScoped<IUserService, UserService>();
|
||||
builder.Services.AddScoped<IECNService, ECNService>();
|
||||
builder.Services.AddScoped<ITrainingService, TrainingService>();
|
||||
builder.Services.AddScoped<ICorrectiveActionService, CorrectiveActionService>();
|
||||
|
||||
builder.Services.AddQuartz(q => {
|
||||
JobKey pendingOOOStatusJob = new JobKey("Pending OOO status job");
|
||||
@ -69,6 +70,26 @@ builder.Services.AddQuartz(q => {
|
||||
.WithIdentity("Expired TECN trigger")
|
||||
.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(6, 0))
|
||||
);
|
||||
|
||||
JobKey trainingReminderJob = new JobKey("Training reminder job");
|
||||
q.AddJob<TrainingNotificationWorker>(opts => opts
|
||||
.WithIdentity(trainingReminderJob)
|
||||
);
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(trainingReminderJob)
|
||||
.WithIdentity("Training reminder trigger")
|
||||
.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(6, 0))
|
||||
);
|
||||
|
||||
JobKey caFollowUpJob = new JobKey("CA follow up job");
|
||||
q.AddJob<CAFollowUpWorker>(opts => opts
|
||||
.WithIdentity(caFollowUpJob)
|
||||
);
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(caFollowUpJob)
|
||||
.WithIdentity("CA follow up trigger")
|
||||
.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(6, 0))
|
||||
);
|
||||
});
|
||||
|
||||
builder.Services.AddQuartzHostedService(opt => {
|
||||
|
Reference in New Issue
Block a user