From c270a5ab061c363de41d4c6fa17c5e6d860c6a4a Mon Sep 17 00:00:00 2001 From: Oscar Gonzalez Date: Mon, 20 Mar 2023 09:55:03 -0300 Subject: [PATCH] commits para que Sofia empiece --- curriculumsearch/src/main/java/com/roshka/service/Scheduler.java | 13 +++++++------ curriculumsearch/src/main/resources/application.properties | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/curriculumsearch/src/main/java/com/roshka/service/Scheduler.java b/curriculumsearch/src/main/java/com/roshka/service/Scheduler.java index de92287..02ae259 100644 --- a/curriculumsearch/src/main/java/com/roshka/service/Scheduler.java +++ b/curriculumsearch/src/main/java/com/roshka/service/Scheduler.java @@ -21,11 +21,9 @@ import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import java.io.IOException; -import java.math.BigInteger; import java.util.Date; import java.util.List; import java.util.Optional; -import java.util.Random; @Configuration @EnableScheduling @@ -37,10 +35,13 @@ public class Scheduler { @PersistenceContext private EntityManager entityManager; - // @Scheduled(cron = "0 0 8 * * MON-FRI") - @Scheduled(cron = "0 * * * * *") + @Scheduled(cron = "0 0 8 * * MON-FRI") +// @Scheduled(cron = "0 * * * * *") public void cumples() { String url = "https://hooks.slack.com/services/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"; + // todo verificar que no sea feriado + // mandar los cumpleaños que fueron sabado y domingo + // si hoy es lunes buscar si hubo cumpleaños sabado y domingo // Verificar el cumpleaños de quien es List cumples = birthdayRepository.findAllByFecha(new Date()); for (Birthday cumple : cumples) { @@ -83,8 +84,8 @@ public class Scheduler { } } - // @Scheduled(cron = "0 0 15 * * FRI") - @Scheduled(cron = "0 * * * * *") + @Scheduled(cron = "0 0 15 * * FRI") +// @Scheduled(cron = "0 * * * * *") public void beneficios() { String url = "https://hooks.slack.com/services/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"; // Traer random diff --git a/curriculumsearch/src/main/resources/application.properties b/curriculumsearch/src/main/resources/application.properties index 7335b08..569702c 100644 --- a/curriculumsearch/src/main/resources/application.properties +++ b/curriculumsearch/src/main/resources/application.properties @@ -8,9 +8,9 @@ spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect spring.sql.init.mode=always spring.sql.init.platform=postgres -#spring.datasource.url=jdbc:postgresql://localhost:5432/thumano -#spring.datasource.username -#spring.datasource.password=postgres +spring.datasource.url=jdbc:postgresql://localhost:5432/thumano +spring.datasource.username=postgres +spring.datasource.password=postgres spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true #server.port=8888 -- libgit2 0.26.0