public Task Execute(IJobExecutionContext context) { LogUtils.Debug("GetInventoryPlanJoB进入"); var baseDataInventoryPlan = InventoryTaskBll.GetInstance().GetInventoryPlanByEquipmnetNameOrId(ApplicationState.GetEquipId()); //校验是否含有数据,如果含有数据,进行后续操作 HttpHelper.GetInstance().ResultCheck(baseDataInventoryPlan, out bool isSuccess); if (isSuccess) { var inventoryPlans = baseDataInventoryPlan.body.objects; CustomizeScheduler.GetInstance().SchedulerStartOrUpdateOrDeleteByPlans(inventoryPlans).Wait(); //cronStr = "0 44 11 * * ?"; } else { LogUtils.Error($"拉取盘点定时计划失败!"); } return(null); }
public void QuartzTestMethod() { CustomizeScheduler.GetInstance().SchedulerStart <GetInventoryPlanJoB>(CustomizeTrigger.GetInventoryPlanTrigger(), GroupName.GetInventoryPlan); System.Threading.Thread.Sleep(2000000); }