diff --git a/src/main/java/com/xkrs/common/StaticScheduleTask.java b/src/main/java/com/xkrs/common/StaticScheduleTask.java index d128c5d..3752899 100644 --- a/src/main/java/com/xkrs/common/StaticScheduleTask.java +++ b/src/main/java/com/xkrs/common/StaticScheduleTask.java @@ -3,6 +3,8 @@ package com.xkrs.common; import com.xkrs.helper.FirePointSubscribeManager; import com.xkrs.utilsnew.DateTimeUtils; import com.xkrs.utilsnew.WeiXinMessageUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.Scheduled; @@ -26,7 +28,7 @@ public class StaticScheduleTask { firePointSubscribeManager.autoSync(); } - //每小时更新一次订阅 + //每小时测试一次微信消息推送 @Scheduled(cron = "0 0 * * * ?") private void testPushWeiXinMessage() { try { @@ -34,8 +36,12 @@ public class StaticScheduleTask { } catch (Exception e) { e.printStackTrace(); } - } + @Scheduled(cron = "*/3 * * * * ?") + private void test() { + Logger log = LoggerFactory.getLogger(StaticScheduleTask.class); + log.info("微信发消息测试5 " + DateTimeUtils.localDateTimeToString(LocalDateTime.now())); + } } \ No newline at end of file