2020-12-21 17:12:10 +01:00
|
|
|
package com.plannaplan.services;
|
|
|
|
|
2021-01-03 18:06:25 +01:00
|
|
|
import org.springframework.context.annotation.Bean;
|
2020-12-23 11:51:17 +01:00
|
|
|
// import org.springframework.beans.factory.annotation.Autowired;
|
2020-12-21 17:12:10 +01:00
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
@Service
|
|
|
|
public class EventService {
|
|
|
|
|
2020-12-23 11:51:17 +01:00
|
|
|
// @Autowired
|
|
|
|
// private EmailService emailService;
|
2020-12-21 17:12:10 +01:00
|
|
|
|
|
|
|
@Scheduled(cron = "0 2 17 * * *")
|
|
|
|
public void collectGroupLosses() {
|
|
|
|
System.out.println("Checking for groups");
|
|
|
|
}
|
2021-01-03 18:06:25 +01:00
|
|
|
|
|
|
|
@Scheduled(cron = "#{@getTourValue}")
|
|
|
|
public void performAcceptAction() {
|
|
|
|
System.out.println("Checking for hahaha");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
public String getTourValue() {
|
|
|
|
return "0 6 18 * * *";
|
|
|
|
}
|
2020-12-21 17:12:10 +01:00
|
|
|
}
|