日期:2014-05-20 浏览次数:20708 次
JobDetail jobDetail = JobBuilder.newJob(SimpleJob.class).withIdentity("Job1", "JobGroup1").build();
JobDetail jobDetail = new JobDetail("job1","jGroup1", SimpleJob.class);
collectJobDetail = new JobDetail("JOB_"+objId, Scheduler.DEFAULT_GROUP,jobClass); collectJobDetail.getJobDataMap().put("hostIp",hostIp); collectJobDetail.getJobDataMap().put("port",port); Trigger trigger = TriggerUtils.makeMinutelyTrigger(minuteInterval); trigger.setName("JOB_Trigger_"+objId); trigger.setStartTime(new Date()); quartzScheduler.scheduleJob(collectJobDetail,trigger);