@Scheduled(cron = "0 5 8 * * *")
public void daily() {
long start = System.currentTimeMillis();
log.info("每日精选启动...");
try {
String date = DateFormatUtils.format(new Date(), pattern);
fanfouHandler.sendContent(dailyChatId, AppUtils.getFanFouDailyByDate(date));
} catch (Exception e) {
log.info(e.getMessage());
appUtils.sendServerChan(e.getMessage(), ExceptionUtils.getStackTrace(e));
}
log.info("每日精选完成,耗时:{} ms", System.currentTimeMillis() - start);
}
FanfouTask.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:telegram-bot
作者:
评论列表
文章目录