Пример #1
0
        /// <summary>
        /// 开启任务
        /// </summary>
        /// <param name="id">任务id</param>
        /// <returns></returns>
        public JsonResult OpenTask(int id)
        {
            var           model = DataBaseLogic.GetJobQuartzByIdList(id);
            OperateStatus statu = new OperateStatus();

            try
            {
                StdSchedulerManager.ResumeJobGroup(model.JobGroup);
                statu.Message    = "开启成功";
                statu.ResultSign = ResultSign.Successful;
            }
            catch (Exception)
            {
                statu.Message    = "关闭失败";
                statu.ResultSign = ResultSign.Error;
            }
            return(Json(statu));
        }