添加是否启动定时任务配置

This commit is contained in:
2023-06-07 09:43:53 +08:00
parent 74548f9b73
commit 82be8aebe7
2 changed files with 5 additions and 2 deletions

View File

@@ -109,6 +109,8 @@ public class Startup : AppStartup
SnowflakeIdHelper.InitYitIdWorker();
serviceProvider.GetRequiredService<ITimeTaskService>().StartTimerJob();
bool isStartTimeJob = App.GetConfig<bool>("IsStartTimeJob");
if(isStartTimeJob)
serviceProvider.GetRequiredService<ITimeTaskService>().StartTimerJob();
}
}