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("预发环境不用同步!");