完成springboot-schedule升级重构

This commit is contained in:
Xiong Neng 2018-09-15 15:33:45 +08:00
parent a3cc973e42
commit 722cdb2e38
2 changed files with 3 additions and 18 deletions

View File

@ -27,7 +27,7 @@ public class HeartbeatJob {
/** /**
* 检查状态1 * 检查状态1
*/ */
@Scheduled(cron = "0 26 19 * * ?") @Scheduled(cron = "0 30 12 * * ?")
public void checkState1() { public void checkState1() {
logger.info(">>>>> cron中午12:30上传检查开始...."); logger.info(">>>>> cron中午12:30上传检查开始....");
logger.info(">>>>> cron中午12:30上传检查完成...."); logger.info(">>>>> cron中午12:30上传检查完成....");
@ -36,7 +36,7 @@ public class HeartbeatJob {
/** /**
* 检查状态2 * 检查状态2
*/ */
@Scheduled(cron = "0 05 18 * * ?") @Scheduled(cron = "0 0 18 * * ?")
public void checkState2() { public void checkState2() {
logger.info(">>>>> cron晚上18:00上传检查开始...."); logger.info(">>>>> cron晚上18:00上传检查开始....");
logger.info(">>>>> cron晚上18:00上传检查完成...."); logger.info(">>>>> cron晚上18:00上传检查完成....");

View File

@ -20,20 +20,5 @@ logging:
ROOT: INFO ROOT: INFO
com: com:
xncoding: DEBUG 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