2020-12-21 17:12:10 +01:00
|
|
|
package com.plannaplan.services;
|
|
|
|
|
|
|
|
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");
|
|
|
|
}
|
|
|
|
|
2020-12-21 17:34:03 +01:00
|
|
|
@Scheduled(cron = "0 45 17 * * *")
|
2020-12-21 17:12:10 +01:00
|
|
|
public void testMail() {
|
|
|
|
this.emailService.sendMail("kaczor982@gmail.com", "Cześć. Jestem Tomek.");
|
|
|
|
}
|
|
|
|
}
|