package com.plannaplan.services; import org.springframework.context.annotation.Bean; // import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; @Service public class EventService { // @Autowired // private EmailService emailService; @Scheduled(cron = "0 2 17 * * *") public void collectGroupLosses() { System.out.println("Checking for groups"); } @Scheduled(cron = "#{@getTourValue}") public void performAcceptAction() { System.out.println("Checking for hahaha"); } @Bean public String getTourValue() { return "0 6 18 * * *"; } }