添加日志测试定时任务
This commit is contained in:
parent
4a628519de
commit
477d0f46ae
@ -3,6 +3,8 @@ package com.xkrs.common;
|
|||||||
import com.xkrs.helper.FirePointSubscribeManager;
|
import com.xkrs.helper.FirePointSubscribeManager;
|
||||||
import com.xkrs.utilsnew.DateTimeUtils;
|
import com.xkrs.utilsnew.DateTimeUtils;
|
||||||
import com.xkrs.utilsnew.WeiXinMessageUtils;
|
import com.xkrs.utilsnew.WeiXinMessageUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
@ -26,7 +28,7 @@ public class StaticScheduleTask {
|
|||||||
firePointSubscribeManager.autoSync();
|
firePointSubscribeManager.autoSync();
|
||||||
}
|
}
|
||||||
|
|
||||||
//每小时更新一次订阅
|
//每小时测试一次微信消息推送
|
||||||
@Scheduled(cron = "0 0 * * * ?")
|
@Scheduled(cron = "0 0 * * * ?")
|
||||||
private void testPushWeiXinMessage() {
|
private void testPushWeiXinMessage() {
|
||||||
try {
|
try {
|
||||||
@ -34,8 +36,12 @@ public class StaticScheduleTask {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Scheduled(cron = "*/3 * * * * ?")
|
||||||
|
private void test() {
|
||||||
|
Logger log = LoggerFactory.getLogger(StaticScheduleTask.class);
|
||||||
|
log.info("微信发消息测试5 " + DateTimeUtils.localDateTimeToString(LocalDateTime.now()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user