[後台] 修改排程開啓weather api 排程

This commit is contained in:
dev02 2023-06-06 16:50:18 +08:00
parent 85747ad5cb
commit e9649bd7f1

View File

@ -142,12 +142,12 @@ namespace BackendWorkerService
); );
#endregion #endregion
//#region 定時取得氣象API #region API
//services.AddSingleton<Quartz.Jobs.WeatherAPIJob>(); services.AddSingleton<Quartz.Jobs.WeatherAPIJob>();
//services.AddSingleton( services.AddSingleton(
//new JobSchedule(jobType: typeof(Quartz.Jobs.WeatherAPIJob), cronExpression: configuration.GetValue<string>("BackgroundServiceCron:WeatherAPIJob")) new JobSchedule(jobType: typeof(Quartz.Jobs.WeatherAPIJob), cronExpression: configuration.GetValue<string>("BackgroundServiceCron:WeatherAPIJob"))
//); );
//#endregion #endregion
}).ConfigureLogging((hostContext, logFactory) => { }).ConfigureLogging((hostContext, logFactory) => {
IConfiguration configuration = hostContext.Configuration; IConfiguration configuration = hostContext.Configuration;