I have a database poller that I have implemented as a scheduled task. I am using Spring 3.0. I want to control the fixed-delay of the scheduled task at runtime using a restful api. Is there a way to achieve this in spring?
as of now i have:
@Scheduled(fixedDelay = 30000)
public void poll() {
if (pollingEnabled) {
// code to do stuff in database
}
}
I want the fixedDelay to be dynamic.Thanks.