1、新建ScheduleConfig类

2、在启动类开启@EnableScheduling支持开启定时任务

3、新建TestSchedule类

4、@Scheduled定时任务执行方式一fixedDelay 时间间隔

5、@Scheduled定时任务执行方式二cron 定时执行

6、cron参数

7、测试

时间:2024-11-12 05:50:07
1、新建ScheduleConfig类
2、在启动类开启@EnableScheduling支持开启定时任务
3、新建TestSchedule类
4、@Scheduled定时任务执行方式一fixedDelay 时间间隔
5、@Scheduled定时任务执行方式二cron 定时执行
6、cron参数
7、测试