I am relatively new to Spring and even newer to Quartz. I have been learning the technology but have run into a wall with Quartz.
Basically I am using a Quartz scheduler that persists all the jobs/triggers/etc on a database. Everything is find and dandy. Runs as expected. However if I need to change the schedule of a Trigger (lets says from eveny 2 seconds to every 5 second). The issue is that changing the repeatInterval value in the bean does not change in the database (Even if i restart the server [don't yet have a need of any dynamic stuff]). So the Trigger still fires every 2 seconds. The only way I was able to change it was by directly deleting the Tigger from the database - which to me is obviously not the best or only way to do it?
Does any one have any insight on what I am missing? My testservlet which is having the problem is pretty simple. I just have one HelloJob such prints "Hello" to console plus the current time.
Posted first on Spring and then later on Terracotta(Quartz) when no solution was found. Then here when didn't any response from Terracotta.
Today I did happen to get a response on Terracotta that this issue is an unfortunate quirk in Spring that conflicts with Quartz. The best way to go about things is by using the Scheduler's getTrigger() and then rescheduleJob() methods.
I was not given a hint of how or where to do this but I have now figured it out. I extended the spring SchedulerFactoryBean and added function to the afterPropertiesSet() method.
Code basically looks like this:
subject: Spring and Quartz - can't update Triggers in database