|
|
|
@ -45,6 +45,7 @@ import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.scheduling.annotation.Scheduled; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
@ -1666,6 +1667,14 @@ public class JobMainTask { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Map<String, String> taskInfos = new HashMap<>(); |
|
|
|
|
|
|
|
@Scheduled(cron="0 10 0 * * ?") |
|
|
|
public void fixedTimer() { |
|
|
|
log.info("JobMainTask fixedTimer clear taskInfos: {}", taskInfos.size()); |
|
|
|
taskInfos.clear(); |
|
|
|
} |
|
|
|
|
|
|
|
@SuppressWarnings({"unused"}) |
|
|
|
public void execEveryDayTask() { |
|
|
|
log.info("***************************** JobTaskTimer execEveryDayTask *************************************"); |
|
|
|
@ -1687,7 +1696,8 @@ public class JobMainTask { |
|
|
|
long fixedDays = TimeUnit.MILLISECONDS.toDays(planTime); |
|
|
|
long fixedStartMinutes = TimeUnit.MILLISECONDS.toMinutes(planTime); |
|
|
|
|
|
|
|
if (currentDays == fixedDays && currentMinutes >= fixedStartMinutes) { |
|
|
|
if (taskInfos.get(redisKey) == null && currentDays == fixedDays && currentMinutes >= fixedStartMinutes) { |
|
|
|
taskInfos.put(redisKey, "1"); |
|
|
|
extractRedisTask(redisKey, taskCode); |
|
|
|
} |
|
|
|
} |
|
|
|
|