Exemple #1
0
    public void Execute(IJobExecutionContext context)
    {
        jobKey = context.JobDetail.Key;
        ZD_SyncTaskConfig plan = MissionSyncHelper.GetTaskInfoByCode(jobKey.Name);

        _logger.InfoFormat("Execute---- {0} 执行中断时间 {1}", jobKey, DateTime.Now.ToString());
    }
        public ActionResult StopPlan(string MissionCodes)
        {
            ZD_SyncTaskConfig plan = new ZD_SyncTaskConfig();

            plan       = MissionSyncHelper.GetTaskInfoByCode(MissionCodes);
            plan.State = 0;
            MissionSyncHelper.UpdateMissionPlan(plan);
            //启动定时任务
            JobScheduler.Stop(plan);
            _logger.InfoFormat(plan.MissionName + "=============禁止时间时间:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            return(AjaxJson(true, "", "", ""));
        }