啓動排程

This commit is contained in:
dev02 2025-01-16 15:07:01 +08:00
parent 595526ab15
commit 4085946ed8

View File

@ -144,17 +144,17 @@ namespace BackendWorkerService
//#endregion
#region API
//services.AddSingleton<Quartz.Jobs.WeatherAPIJob>();
//services.AddSingleton(
//new JobSchedule(jobType: typeof(Quartz.Jobs.WeatherAPIJob), cronExpression: configuration.GetValue<string>("BackgroundServiceCron:WeatherAPIJob"))
//);
services.AddSingleton<Quartz.Jobs.WeatherAPIJob>();
services.AddSingleton(
new JobSchedule(jobType: typeof(Quartz.Jobs.WeatherAPIJob), cronExpression: configuration.GetValue<string>("BackgroundServiceCron:WeatherAPIJob"))
);
#endregion
#region ( )
//services.AddSingleton<ArchiveSolarHourJob>();
//services.AddSingleton(
//new JobSchedule(jobType: typeof(ArchiveSolarHourJob), cronExpression: configuration.GetValue<string>("BackgroundServiceCron:ArchiveSolarHourJob"))
//);
services.AddSingleton<ArchiveSolarHourJob>();
services.AddSingleton(
new JobSchedule(jobType: typeof(ArchiveSolarHourJob), cronExpression: configuration.GetValue<string>("BackgroundServiceCron:ArchiveSolarHourJob"))
);
#endregion
#region ( )