From 59b1bb0e2287b533f7c2bf881a4aa32e0de913d7 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Thu, 31 Aug 2023 16:05:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=AE=9A=E6=97=B6=E5=99=A8?= =?UTF-8?q?=20=E5=90=8C=E6=AD=A5=E9=A1=B9=E7=9B=AE=E5=BD=92=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/scheduler/task/SynProjectCollectionTask.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java index 6c4296e..a7b9116 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java @@ -26,9 +26,6 @@ import java.net.UnknownHostException; @RequiredArgsConstructor public class SynProjectCollectionTask { - @Value("${task.switch.is-open}") - private boolean flag; - @Value("${task.host}") public String HOST; @@ -46,11 +43,11 @@ public class SynProjectCollectionTask { * 定时同步前置机数据 每天1点开始执行一次 * */ - @Scheduled(cron = "0 5 16 * * ?") + @Scheduled(cron = "0 10 16 * * ?") public void doTask() throws UnknownHostException { - if (!flag || !HOST.equals(InetAddress.getLocalHost().getHostName())) { - log.info("定时器没开启或者host不对! {} {}:{}", - flag,HOST,InetAddress.getLocalHost().getHostName()); + if (!HOST.equals(InetAddress.getLocalHost().getHostName())) { + log.info("定时器没开启或者host不对! {}:{}", + HOST,InetAddress.getLocalHost().getHostName()); } if(BizConst.PRE.equals(active)){ log.info("预发环境不用同步!");