liupeng 3 年之前
父节点
当前提交
78b988ef81
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. 10 2
      code/sapparent/sapservice/src/main/java/org/fouram/job/CheckTaskSchedule.java

+ 10 - 2
code/sapparent/sapservice/src/main/java/org/fouram/job/CheckTaskSchedule.java

@@ -39,12 +39,20 @@ public class CheckTaskSchedule {
 	public void taskBiz() throws Exception {
 		LoggerUtil.info(DateUtil.getTime());
 		try {
-			if (DateUtil.getHour().equals("10") || DateUtil.getHour().equals("20")) {
+			// 8点重新生成下昨天数据
+			if (DateUtil.getHour().equals("08")) {
+				String lastDay = DateUtil.getAfterDay(-1);
+				LoggerUtil.info(lastDay + "执行开始:" + DateUtil.getTime());
+				executeBiz(lastDay);
+				LoggerUtil.info(lastDay + "执行结束:" + DateUtil.getTime());
+			}
+			// 10点、22点生成今天数据
+			if (DateUtil.getHour().equals("10") || DateUtil.getHour().equals("22")) {
 				LoggerUtil.info(DateUtil.getDay() + "执行开始:" + DateUtil.getTime());
 				executeBiz(DateUtil.getDay());
 				LoggerUtil.info(DateUtil.getDay() + "执行结束:" + DateUtil.getTime());
 			}
-			// 重新执行最近30天
+			// 11点重新执行最近30天
 			if (DateUtil.getHour().equals("11")) {
 				for (String day : DateUtil.getSubDateList(DateUtil.getAfterDay(-30), DateUtil.getDay())) {
 					LoggerUtil.info(day + "执行开始:" + DateUtil.getTime());