From 722cdb2e38effbfd9f2d04d5ba402c1ff6b03c57 Mon Sep 17 00:00:00 2001 From: Xiong Neng Date: Sat, 15 Sep 2018 15:33:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90springboot-schedule=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xncoding/pos/jobs/HeartbeatJob.java | 4 ++-- .../src/main/resources/application.yml | 17 +---------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/springboot-schedule/src/main/java/com/xncoding/pos/jobs/HeartbeatJob.java b/springboot-schedule/src/main/java/com/xncoding/pos/jobs/HeartbeatJob.java index 0b3b555..e640631 100644 --- a/springboot-schedule/src/main/java/com/xncoding/pos/jobs/HeartbeatJob.java +++ b/springboot-schedule/src/main/java/com/xncoding/pos/jobs/HeartbeatJob.java @@ -27,7 +27,7 @@ public class HeartbeatJob { /** * 检查状态1 */ - @Scheduled(cron = "0 26 19 * * ?") + @Scheduled(cron = "0 30 12 * * ?") public void checkState1() { logger.info(">>>>> cron中午12:30上传检查开始...."); logger.info(">>>>> cron中午12:30上传检查完成...."); @@ -36,7 +36,7 @@ public class HeartbeatJob { /** * 检查状态2 */ - @Scheduled(cron = "0 05 18 * * ?") + @Scheduled(cron = "0 0 18 * * ?") public void checkState2() { logger.info(">>>>> cron晚上18:00上传检查开始...."); logger.info(">>>>> cron晚上18:00上传检查完成...."); diff --git a/springboot-schedule/src/main/resources/application.yml b/springboot-schedule/src/main/resources/application.yml index 90acc9c..79e29ca 100644 --- a/springboot-schedule/src/main/resources/application.yml +++ b/springboot-schedule/src/main/resources/application.yml @@ -20,20 +20,5 @@ logging: ROOT: INFO com: xncoding: DEBUG - file: E:/logs/app.log + file: D:/logs/app.log ---- - -##################################################################### -######################## 测试环境profile ########################## -##################################################################### - -spring: - profiles: test - -logging: - level: - ROOT: INFO - com: - xncoding: DEBUG - file: /var/logs/app.log