diff --git a/src/main/java/com/xkrs/microservice/common/schedule/SaticScheduleTask.java b/src/main/java/com/xkrs/microservice/common/schedule/SaticScheduleTask.java index 4c69ec8..a7d3788 100644 --- a/src/main/java/com/xkrs/microservice/common/schedule/SaticScheduleTask.java +++ b/src/main/java/com/xkrs/microservice/common/schedule/SaticScheduleTask.java @@ -28,25 +28,25 @@ public class SaticScheduleTask { @Resource private WeatherGet weatherGet; -// /** -// * 定时获取数据,每天9:31 触发 -// */ -// @Scheduled(cron = "00 31 9 ? * *") -// private void dailyReportFireLastTasks() { -// LocalDate pdfStartDate = LocalDate.of(2021, 5, 20); -// String url = "http://47.105.215.208:8005/intfa/queryData/16079680"; -// Map postParam = new HashMap<>(8); -// -// } + /** + * 定时获取数据,每天9:31 触发 + */ + @Scheduled(cron = "00 31 9 ? * *") + private void dailyReportFireLastTasks() { + LocalDate pdfStartDate = LocalDate.of(2021, 5, 20); + String url = "http://47.105.215.208:8005/intfa/queryData/16079680"; + Map postParam = new HashMap<>(8); -// /** -// * 定时获取气象站数据 每 5 分钟触发 -// */ -// @Scheduled(cron = "0 0/5 * * * ?") -// private void configureTasks() { -// logger.info("执行静态定时任务时间: " + LocalDateTime.now()); -// weatherGet.findWeather(); -// } + } + + /** + * 定时获取气象站数据 每 5 分钟触发 + */ + @Scheduled(cron = "0 0/5 * * * ?") + private void configureTasks() { + logger.info("执行静态定时任务时间: " + LocalDateTime.now()); + weatherGet.findWeather(); + } public static void main(String[] args) { String url = "http://47.105.215.208:8005/intfa/queryData/16079680";