Spring 是否可以在运行时配置@Scheduled任务的固定延迟

Spring 是否可以在运行时配置@Scheduled任务的固定延迟,spring,scheduled-tasks,Spring,Scheduled Tasks,我有一个数据库轮询器,它是作为计划任务实现的。我正在使用Spring3.0。我希望使用restful api在运行时控制调度任务的固定延迟。有没有办法在春季实现这一目标 到目前为止,我有: @Scheduled(fixedDelay = 30000) public void poll() { if (pollingEnabled) { // code to do stuff in database } } @计划(固定时

我有一个数据库轮询器,它是作为计划任务实现的。我正在使用Spring3.0。我希望使用restful api在运行时控制调度任务的固定延迟。有没有办法在春季实现这一目标

到目前为止,我有:

@Scheduled(fixedDelay = 30000) public void poll() { if (pollingEnabled) { // code to do stuff in database } } @计划(固定时间=30000) 公众投票{ 如果(可轮询){ //在数据库中执行操作的代码 } } 我希望fixedDelay是动态的。谢谢。