mesa-fab-approval/Fab2ApprovalSystem/JobSchedules/OOOTrainingReportJobSchedule.cs
Mike Phares b1c6903c1c Tasks 184281, 184799, 184800, 184801 and 184802
Align .editorconfig files

Move Controller logic to DMO classes

GlobalVars.AppSettings = Models.AppSettings.GetFromConfigurationManager();

Question EditorConfig
Project level editorconfig
Format White Spaces
AppSetting when EnvironmentVariable not set
Corrective Actions Tests
Schedule Actions Tests
DMO Tests
Controller Tests

Get ready to use VSCode IDE
2024-12-04 11:58:13 -07:00

28 lines
905 B
C#

using Fab2ApprovalSystem.Workers;
using Quartz;
using Quartz.Impl;
namespace Fab2ApprovalSystem.JobSchedules;
public class OOOTrainingReportJobSchedule {
public static void Start() {
ISchedulerFactory schedulerFactory = new StdSchedulerFactory();
IScheduler scheduler = schedulerFactory.GetScheduler().GetAwaiter().GetResult();
scheduler.Start();
IJobDetail oooTrainingReportJob = JobBuilder.Create<OOOTrainingReportJob>()
.WithIdentity("oooTrainingReportJob", "trainingReportGroup")
.Build();
ITrigger oooTrainingReportTrigger = TriggerBuilder.Create()
.WithIdentity("oooTrainingReportTrigger", "trainingReportGroup")
.WithCronSchedule("0 0 12 ? * 2 *")
.ForJob(oooTrainingReportJob)
.Build();
scheduler.ScheduleJob(oooTrainingReportJob, oooTrainingReportTrigger);
}
}