[後台] 修改排程開啓weather api 排程
This commit is contained in:
parent
85747ad5cb
commit
e9649bd7f1
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user