@EnableScheduling fixedDelay
时间: 2023-10-12 16:05:29 浏览: 94
@Scheduled注解是Spring框架中用于实现定时任务的注解之一。其中,@Scheduled(fixedDelay)用于指定任务间隔的固定延迟时间,即上一次任务执行完成后,等待一定的时间再执行下一次任务。而@Scheduled(fixedDelayString)与@Scheduled(fixedDelay)的作用相同,只是使用字符串的形式,并支持占位符的使用。例如,在配置文件中设置了一个占位符time.fixedDelay=3000,那么可以使用@Scheduled(fixedDelayString = "${time.fixedDelay}")来指定任务的固定延迟时间。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [SpringBoot定时任务@EnableScheduling和@Scheduled 参数详解 cron表达式](https://blog.csdn.net/qq_40600507/article/details/105074157)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [springboot中@EnableScheduling注解作用](https://blog.csdn.net/footbridge/article/details/121921790)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文