jsf jsf - 27 days ago 4x
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

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