TASK:定时任务执行周期;

This commit is contained in:
shahaibo
2024-01-09 13:44:15 +08:00
parent 7a0b6307b0
commit a3ae8401fb

View File

@@ -17,9 +17,9 @@ public class MyTaskScheduler {
@Resource
private AccountMapper accountMapper;
// 定时任务,每周一零点执行一次
@Scheduled(cron = "0 0 0 ? * MON")
// @Scheduled(cron = "0 0/1 * * * ?")
// 定时任务,每十五天执行一次
// @Scheduled(cron = "0 0 0 ? * MON")
@Scheduled(cron = "0 0 0 */15 * ?")
public void checkExpiry() {
// 检测正式用户是否快要过期
QueryWrapper<Account> qw = new QueryWrapper<>();