|
@@ -8,6 +8,7 @@ import com.gyee.frame.service.weather.WfnwpdataService;
|
|
|
import com.gyee.frame.util.DateUtils;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
@@ -18,7 +19,7 @@ import java.util.*;
|
|
|
/**
|
|
|
* 采集风速到weatherfd表
|
|
|
*/
|
|
|
-//@Component
|
|
|
+@Component
|
|
|
public class TaskWeatherGather {
|
|
|
|
|
|
//默认预测数据 40 天
|
|
@@ -42,8 +43,8 @@ public class TaskWeatherGather {
|
|
|
/**
|
|
|
* 延时1分钟 每天凌晨1点执行一次
|
|
|
*/
|
|
|
-// @Scheduled(initialDelay = 60 * 1000, cron = "0 0 1 * * ")
|
|
|
- @Scheduled(initialDelay = 30 * 1000, fixedRate = 2 * 86400 * 1000)
|
|
|
+ @Scheduled(cron = "0 0 1 * * ?")
|
|
|
+// @Scheduled(initialDelay = 30 * 1000, fixedRate = 2 * 86400 * 1000)
|
|
|
public void gatherTask() {
|
|
|
for (int key : wp_map.keySet()) {
|
|
|
String[] value = wp_map.get(key).split("#");
|