Hi Guys,
I am using quartz and in the process of creating some persistant jobs. I have 4 job types
Daily Reports
Nightly Reports
Weekly Reports
Monthly Reports
This will mean i will have 4 cron triggers corresponding to the frequence of the report.
Ideally when i create a new JobDetail i would ideally like to re-use the cron triggers. e.g i might have 100 daily reports. Can i not just reference an existing cron trigger for daily reports?
When i try and schedule job, i getCode:JobDetail jobDetail = new JobDetail("report3", "DailyReport", ReportJob.class); jobDetail.setJobDataMap(dataMap); cTrigger = (CronTrigger)scheduler.getTrigger("DailyReport", "DailyReport"); cTrigger.setJobName("report3"); scheduler.scheduleJob(jobDetail,cTrigger);
So for each job i create must i create a new CronTrigger for each?Code:org.quartz.ObjectAlreadyExistsException: Unable to store Trigger with name: 'DailyReport' and group: 'DailyReport', because one already exists with this identification.


Reply With Quote