From ff05fadea3a3211b0855f2dccd8578088accd142 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Tue, 24 Apr 2018 18:11:55 +0800 Subject: [PATCH] update --- .../com/royalpay/payment/manage/task/PostponeClientTask.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java index 98d6fa4de..8761b4d9c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java +++ b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java @@ -15,6 +15,7 @@ import org.apache.commons.lang3.time.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -29,7 +30,7 @@ import javax.annotation.Resource; * Created by wangning on 2018/1/2. */ @Component -//@ConditionalOnProperty(value = "app.run-tasks", havingValue = "true") +@ConditionalOnProperty(value = "app.run-tasks", havingValue = "true") public class PostponeClientTask { Logger logger = LoggerFactory.getLogger(PostponeClientTask.class); @@ -44,7 +45,7 @@ public class PostponeClientTask { @Resource private ManagerMapper managerMapper; - // @Scheduled(cron = "0 30 8 * * ?") + @Scheduled(cron = "0 30 8 * * ?") public void checkGreenChannel() { Date now = new Date(); Date tomorrow = DateUtils.addDays(now, 1);