metodo scheduled

This commit is contained in:
2025-03-14 15:06:02 +01:00
parent 4ab39539bc
commit 4273d3ef44

View File

@ -69,6 +69,10 @@ public class TelegramBot extends TelegramLongPollingBot {
} }
@Scheduled(cron = "0 0 13,20 * * ?", zone = "Europe/Paris") @Scheduled(cron = "0 0 13,20 * * ?", zone = "Europe/Paris")
private void mensajeProgramado(){
this.construirResumenNoticias("-4731993289");
}
private void construirResumenNoticias(String chatid) { private void construirResumenNoticias(String chatid) {
LocalDate today = LocalDate.now(); LocalDate today = LocalDate.now();
String fechaInicio = today.minusDays(1).format(DateTimeFormatter.ISO_DATE); String fechaInicio = today.minusDays(1).format(DateTimeFormatter.ISO_DATE);