1234567891011121314151617181920212223242526 |
- package com.example.getweather.job;
- import com.example.getweather.service.GetWeatherXmo;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.scheduling.annotation.EnableScheduling;
- import org.springframework.scheduling.annotation.Scheduled;
- import org.springframework.stereotype.Service;
- import javax.annotation.Resource;
- @Slf4j
- @Service
- @EnableScheduling
- public class DownloadXmo {
- @Resource
- private GetWeatherXmo getWeatherXmo;
- //曦谋数据接入。 2025-02-10 应窦哥要求 小时气象源切换为xmo
- //每天1点下载数据
- //@Scheduled(fixedDelay = 600000000)
- @Scheduled(cron = "0 0 7,13 * * ?")
- public void download() {
- getWeatherXmo.download();
- }
- }
|