lyhzzz 2 年之前
父節點
當前提交
19c230b9a7
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      src/main/java/com/fdkankan/tools/task/TaskService.java

+ 3 - 4
src/main/java/com/fdkankan/tools/task/TaskService.java

@@ -25,15 +25,15 @@ public class TaskService {
     @Value("${spring.profiles.active}")
     private String active;
 
-    @Scheduled(cron = "0 */1 * * * ?}")
+    @Scheduled(cron = "0 0 0 * * ?}")
     public void genOldCode() {
         Integer count = 10000;
         log.info("task-genOldCode:{}","触发定时任务生成old-prod指房宝场景码");
         zfbOldToNewService.genOldCode(count);
     }
 
-    //@Scheduled(cron = "0 0 1 * * ?}")
-    @Scheduled(cron = "0 */1 * * * ?}")
+    @Scheduled(cron = "0 0 1 * * ?}")
+    //@Scheduled(cron = "0 */1 * * * ?}")
     public void genNewCode() {
         if(active.contains("old")){
             return;
@@ -42,5 +42,4 @@ public class TaskService {
         log.info("task-genNewCode:{}","触发定时任务生成new-prod指房宝场景码");
         zfbOldToNewService.genNewCode(count);
     }
-
 }