metodo scheduled
This commit is contained in:
@ -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);
|
||||||
|
Reference in New Issue
Block a user