智慧保安后台管理-外网
Administrator
2021-12-10 00754b2fb8e71be738e6c312e11d62e64a4e82c3
src/main/java/org/springblade/modules/crontab/Crontab.java
@@ -7,6 +7,9 @@
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
 * 定时任务
 * @author zhongrj
@@ -22,10 +25,11 @@
    * 定时任务,每天凌晨1点执行一次,
    * 自动处理之前报了名,申请了考试又没有去考试的,做缺考标记,并将报名状态修改为已取消报名
    */
   @Scheduled(cron = "* * 1 * * ?")
   @Scheduled(cron = "0 0 23 * * ?")
//   @Scheduled(cron = "*/30 * * * * ?")
   @GetMapping("/examApplyStatus")
   public void examApplyStatus(){
      System.out.println("执行时间:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
      //自动处理之前报了名,申请了考试又没有去考试的,做缺考标记,并将报名状态修改为已取消报名
      trainingRegistrationService.examApplyStatus();
   }