Women in Technology

Hear us Roar

  Job Scheduling in Java
Subject:   org.quartz.ObjectAlreadyExistsException:
Date:   2005-04-11 03:25:50
From:   Quartz
Hi, i am getting the "org.quartz.ObjectAlreadyExistsException: 'JOB 1' and group: 'JGRP1', because one already exists with this identification." exception while adding the new Trigger for the already exising job? Kindly let me know,

1. How can i add the multible triggers for the same Job (from same Job Group)?

My Code looks like this.
JobDetail job1 = new JobDetail("JOB 1","JGRP1",DumbJob2.class);
SimpleTrigger ct = new SimpleTrigger("TRG1","TGRP1", new Date(),
new Date(), 1, 10001);
sched.scheduleJob(job1, ct);

JobDetail job2 = new JobDetail("JOB 2","JGRP2",DumbJob2.class);
SimpleTrigger ct2 = new SimpleTrigger("TRG2","TGRP2", new Date(),
new Date(), 2, 10001);
sched.scheduleJob(job1, ct2);