Results 1 to 9 of 9

Thread: Spring + Quartz: persisted triggers not changing when config is modified

  1. #1
    Join Date
    Jan 2007
    Posts
    13

    Default Spring + Quartz: persisted triggers not changing when config is modified

    Greetings all,

    This may be a simple question, but I haven't been able to find much about it and the behavior confuses me.

    The environment is Quartz 1.5.2/Spring 2.0. I am using persistent cron triggers and I have been trying to change the cron expression and the misfire instruction by changing the properties in the CronTriggerBean.

    I make the changes in the config file, but when I restart the SchedulerFactory for my app the changes are not being reflected in the database for the persisted trigger.

    I'm thinking I must be missing something simple here, but not sure what. Any advice would be greatly appreciated!

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    When you restart the server, do you get another trigger added to the database instead of it changing the existing one?

  3. #3
    Join Date
    Jan 2007
    Posts
    13

    Default

    Hi, thanks for the reply.

    No, I don't get a new trigger added, it just doesn't change the properties of the existing one.

  4. #4
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I'd have a look at the API and see what's on offer. Have you tried this?
    public void setOverwriteExistingJobs(boolean overwriteExistingJobs)

    Set whether any jobs defined on this SchedulerFactoryBean should overwrite existing job definitions. Default is "false", to not overwrite already registered jobs that have been read in from a persistent job store.
    http://www.springframework.org/docs/...obs (boolean)

  5. #5
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Forget that, I'm talking rubbish. You want to change the Trigger details not the Job.

  6. #6
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Oh, actually on looking at the source code, it seems the same flag controls both the rescheduling of the Job and the Trigger. That should work after all .

  7. #7
    Join Date
    Jan 2007
    Posts
    13

    Default

    Thanks for the help, I'll give that a try and let you know how it worked out!

  8. #8
    Join Date
    Jan 2007
    Posts
    13

    Default

    Awesome, that worked.

    Thanks!


  9. #9
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Great, glad it worked! We both learned something as well .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •