@Component
public class Scheduled {
SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
@Scheduled(cron = "0 0/30 * * * ? ") //每隔30分钟执行一次
public void timerRate() {
System.out.println(dateFormat.format(new Date()));
//编写 需要定时执行的业务就OK了
aaa(User);
}
}
timed task
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=325847351&siteId=291194637
Recommended
Ranking