예제 #1
0
 @RequestMapping(value = "add")
 public @ResponseBody Boolean deploy(
     String jobName,
     String triggerName,
     String jobClassName,
     String cronExpression,
     Boolean listener) {
   JobModel model = new JobModel();
   model.setJobName(jobName);
   model.setTriggerName(triggerName);
   model.setJobClassName(jobClassName);
   model.setCronExpression(cronExpression);
   if (listener != null) {
     model.setListener(true);
   } else {
     model.setListener(false);
   }
   return quartzService.deploy(model);
 }
예제 #2
0
 @RequestMapping(value = "run")
 public @ResponseBody Boolean startNow(String jobName, String jobGroup) {
   JobKey jobKey = new JobKey(jobName, jobGroup);
   return quartzService.startNow(jobKey);
 }
예제 #3
0
 @RequestMapping(value = "resume")
 public @ResponseBody Boolean resume(String jobName, String jobGroup) {
   JobKey jobKey = new JobKey(jobName, jobGroup);
   return quartzService.resume(jobKey);
 }
예제 #4
0
 @RequestMapping(value = "remove")
 public @ResponseBody Boolean unDeploy(String jobName, String jobGroup) {
   JobKey jobKey = new JobKey(jobName, jobGroup);
   return quartzService.unDeploy(jobKey);
 }
예제 #5
0
 @RequestMapping(value = "index")
 public String index(Model model) {
   model.addAttribute("jobs", quartzService.getAllJobs());
   return "index";
 }