return "list";
}
public String add() throws Exception {
QuartzInstance instance = Tools.getQuartzInstance();
HashMap<String, Object> triggerMap = new HashMap<String, Object>();
triggerMap.put("name", triggerInput.getName());
triggerMap.put("group",triggerInput.getGroup());
triggerMap.put("description", triggerInput.getDescription());
if(triggerInput.getDateFlag() == 1){
triggerMap.put("startTime", triggerInput.getDate());
triggerMap.put("triggerClass", "org.quartz.impl.triggers.SimpleTriggerImpl");
}else{
triggerMap.put("cronExpression", triggerInput.getCron());
triggerMap.put("triggerClass", "org.quartz.impl.triggers.CronTriggerImpl");
}
Job job = JobContainer.getJobById(jobId);
triggerMap.put("jobName", job.getJobName());
triggerMap.put("jobGroup", job.getGroup());
instance.getJmxAdapter().addTriggerForJob(instance, instance.getSchedulerByName(job.getSchedulerName()), job,triggerMap);
log.info("add trigger for job:"+job.getJobName());
Result result = new Result();