Do not ntfy on already performed scheduled or missed schedules
All checks were successful
Java CI with Maven / build-and-push-frontend (push) Successful in 12s
Java CI with Maven / build-and-push-backend (push) Successful in 9s

This commit is contained in:
Sebastian Böckelmann 2024-03-14 14:46:59 +01:00
parent 4155af45f5
commit 526c57a362

View File

@ -231,7 +231,8 @@ public class TaskScheduleService {
Iterable<AdvancedTaskSchedule> allSchedules = advancedScheduleRepository.findAll(); Iterable<AdvancedTaskSchedule> allSchedules = advancedScheduleRepository.findAll();
List<AdvancedTaskSchedule> schedulesToday = new ArrayList<>(); List<AdvancedTaskSchedule> schedulesToday = new ArrayList<>();
for(AdvancedTaskSchedule advancedTaskSchedule : allSchedules) { for(AdvancedTaskSchedule advancedTaskSchedule : allSchedules) {
if(advancedTaskSchedule.getScheduleStart().toLocalDate().equals(date)) { if(advancedTaskSchedule.getScheduleStart().toLocalDate().equals(date) && advancedTaskSchedule.getStartTime() == null &&
advancedTaskSchedule.getScheduleStart().isBefore(LocalDateTime.now())) {
schedulesToday.add(advancedTaskSchedule); schedulesToday.add(advancedTaskSchedule);
} }
} }