From db573c0cb02c8ec2227971aafd149f9b5bfdb372 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Thu, 24 Aug 2023 10:35:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ningdatech/syndataapi/scheduler/task/SynDataTask.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/syn-data-task/src/main/java/com/ningdatech/syndataapi/scheduler/task/SynDataTask.java b/syn-data-task/src/main/java/com/ningdatech/syndataapi/scheduler/task/SynDataTask.java index 6b0773e..cbe2d85 100644 --- a/syn-data-task/src/main/java/com/ningdatech/syndataapi/scheduler/task/SynDataTask.java +++ b/syn-data-task/src/main/java/com/ningdatech/syndataapi/scheduler/task/SynDataTask.java @@ -190,14 +190,15 @@ public class SynDataTask { /** - * 定时同步前置机数据 每天3点开始执行一次 + * 前置机每天晚上10点自动清空,第二天早上6点获取数据 + * 定时同步前置机数据 每天1点开始执行一次 * */ - @Scheduled(cron = "0 15 10 * * ?") + @Scheduled(cron = "0 0 1 * * ?") public void doTask() throws UnknownHostException { if (flag && HOST.equals(InetAddress.getLocalHost().getHostName())) { log.info("数据同步任务开始"); - // 前置机每天晚上10点自动清空,测试数据只有一条,这里只插入一条 + // 测试数据只有一条,这里只插入一条 // 项目基本信息 ProjectBaseInfo projectBaseInfo = JSON.parseObject(PROJECT_BASE_INFO_TEST_DATA, ProjectBaseInfo.class);