timemanager/backend/src/main/java/core/DemoApplication.java
Sebastian Böckelmann f2823ad21e
All checks were successful
Java CI with Maven / build-and-push-frontend (push) Successful in 25s
Java CI with Maven / build-and-push-backend (push) Successful in 8s
Schedule notifcations for all todays schedules and stop notification when schedule is activated
2024-03-14 12:22:24 +01:00

40 lines
1.1 KiB
Java

package core;
import core.entities.RoleEntity;
import core.entities.UserRole;
import core.entities.timemanager.AdvancedTaskSchedule;
import core.repositories.RoleRepository;
import core.repositories.UserRepository;
import core.services.PropertyService;
import core.services.TaskScheduleService;
import core.services.ntfy.TaskSchedulingService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.PropertySource;
import org.springframework.scheduling.annotation.EnableScheduling;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
@SpringBootApplication
@EnableScheduling
public class DemoApplication{
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
@Bean
public CommandLineRunner init(TaskSchedulingService taskSchedulingService) {
return args -> {
taskSchedulingService.scheduleStartReminders();
};
}
}