jsf jsf - 1 year ago 225
Java Question

How to change Spring's @Scheduled fixedDelay at runtime

I have a requirement to run a batch job at a fixed interval and have the ability to change the time of this batch job at runtime. For this I came across @Scheduled annotation provided under Spring framework. But I'm not sure how I'd change the value of fixedDelay at runtime. I did some googling around but didn't find anything useful.

ach ach
Answer Source

You can use a Trigger to dynamically set the next execution time. See my answer here:

scheduling a job with spring programmitically with a fixedrate set from a database value/user input

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download