backend/buisnesslogic/src/main/java/com/plannaplan/services/EventService.java

23 lines
593 B
Java
Raw Normal View History

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