bgService: 開啟停車場服務更新功能

This commit is contained in:
jiahao 2023-09-27 16:14:58 +08:00
parent a539c8148c
commit 9e5bdb2ea5
2 changed files with 5 additions and 5 deletions

View File

@ -122,10 +122,10 @@ namespace BackendWorkerService
//#endregion
//#region 停車場管理(設定每 5秒 執行一次)
//services.AddSingleton<ParkingJob>();
//services.AddSingleton(
//new JobSchedule(jobType: typeof(ParkingJob), cronExpression: configuration.GetValue<string>("BackgroundServiceCron:ParkingJob"))
//);
services.AddSingleton<ParkingJob>();
services.AddSingleton(
new JobSchedule(jobType: typeof(ParkingJob), cronExpression: configuration.GetValue<string>("BackgroundServiceCron:ParkingJob"))
);
//#endregion
//#region 電錶歸檔(設定每 小時 執行一次)