@Scheduled(fixedDelay = 5000)
@Scheduled(fixedDelay = 5000),是启动后,马上开始第一次执行任务的么? 应用启动时,任务会被立即执行。
执行完成后,会等待5秒(因为fixedDelay设置为5000毫秒),然后再次执行任务。
以后每次执行完任务,都会等待5秒后再次执行。
类的注解:
@Configuration
@EnableScheduling
@Scheduled(fixedDelay = 5000)
@Scheduled(fixedDelay = 5000),是启动后,马上开始第一次执行任务的么? 应用启动时,任务会被立即执行。
执行完成后,会等待5秒(因为fixedDelay设置为5000毫秒),然后再次执行任务。
以后每次执行完任务,都会等待5秒后再次执行。
类的注解:
@Configuration
@EnableScheduling
暂无评论
2023-12-22
2023-12-19
2023-12-15
2023-12-15
2023-12-08
2023-12-07
2023-12-07
2024-05-20
2024-05-20
2024-05-18
2024-05-18
2024-05-18
2024-05-18
2024-05-18
2024-05-18
2024-05-18
2024-05-18
2024-05-18
2024-05-18
2024-05-18
2024-05-18
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17