Does anyone have a thorough knowledge of Quartz scheduler?!

I'm to set up a simple Quartz scheduling in my small application!  I have set up a Quartz Schedule but I'm getting the following Exception which I have difficulty understanding where it comes from!

org.quartz.ObjectAlreadyExistsException: Unable to store Job : 'DEFAULT.Job1', because one already exists with this identification.

snajalmAsked:
Who is Participating?
 
snajalmAuthor Commented:
Here's the solution to this issue!

if (!scheduler.checkExists(trigger.getJobKey()) && !scheduler.checkExists(job.getKey())) {
            scheduler.scheduleJob(job, trigger);
} else {
            scheduler.rescheduleJob(trigger.getKey(), trigger);
}

Open in new window

0
 
CEHJCommented:
Sounds like you have duplicate jobs. Check this out

http://www.redstream.nl/2007/04/26/scheduling-with-spring-and-quartz/
0
 
snajalmAuthor Commented:
Hi CEHJ,

Thanks for the link but I'm not using crons.  I'm using simple triggers.  If I post the code would you be able to see where the problem is??!  Are you familiar with Quartz?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
CEHJCommented:
I don't know if i could help i'm afraid. It does sound like a similar problem
0
 
for_yanCommented:


cehck this discussion - seesm to be releavnt to your case and has some recommendations and even code
which might remedy the issue:
http://forum.springsource.org/showthread.php?54275-Unable-to-store-Job-with-name-jobDetail-and-group-quartz-batch
0
 
snajalmAuthor Commented:
I resolved this problem with adding these few lines of code at the end on my scheduler object!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.