1 public ActionResult Run(Guid id) 2 { 3 var success = this.jobApplication.Update(new JobCURequest() 4 { 5 Id = id, 6 TriggerState = Quartz.TriggerState.Normal.ToString() 7 }); (success) 10 { 11 var entity = this.jobApplication.Get(id); 12 JobHelper.Run(entity); 13 } RedirectToAction(, ); 16 } ActionResult Pause(Guid id) 19 { 20 var success = this.jobApplication.Update(new JobCURequest() 21 { 22 Id = id, 23 TriggerState = Quartz.TriggerState.Paused.ToString() 24 }); (success) 27 { entity = this.jobApplication.Get(id); 30 JobHelper.Pause(entity); 31 } , ); 33 } ActionResult Resume(Guid id) 36 { 37 var success = this.jobApplication.Update(new JobCURequest() 38 { 39 Id = id, 40 TriggerState = Quartz.TriggerState.Normal.ToString() 41 }); (success) 44 { 45 var entity = this.jobApplication.Get(id); 46 JobHelper.Resume(entity); 47 } RedirectToAction(, ); 50 }
2.3、好了,现在开启服务端
2.4、执行
2.5、暂停
2.6、恢复
好了,基本上就是这些了