[後台] 修改排程開啓weather api 排程
This commit is contained in:
parent
85747ad5cb
commit
e9649bd7f1
@ -142,12 +142,12 @@ 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"))
|
||||
//);
|
||||
//#endregion
|
||||
#region 定時取得氣象API
|
||||
services.AddSingleton<Quartz.Jobs.WeatherAPIJob>();
|
||||
services.AddSingleton(
|
||||
new JobSchedule(jobType: typeof(Quartz.Jobs.WeatherAPIJob), cronExpression: configuration.GetValue<string>("BackgroundServiceCron:WeatherAPIJob"))
|
||||
);
|
||||
#endregion
|
||||
|
||||
}).ConfigureLogging((hostContext, logFactory) => {
|
||||
IConfiguration configuration = hostContext.Configuration;
|
||||
|
Loading…
Reference in New Issue
Block a user