Commit c270a5ab by Oscar Gonzalez

commits para que Sofia empiece

parent 9a58b825
...@@ -21,11 +21,9 @@ import javax.persistence.EntityManager; ...@@ -21,11 +21,9 @@ import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext; import javax.persistence.PersistenceContext;
import javax.persistence.Query; import javax.persistence.Query;
import java.io.IOException; import java.io.IOException;
import java.math.BigInteger;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.Random;
@Configuration @Configuration
@EnableScheduling @EnableScheduling
...@@ -37,10 +35,13 @@ public class Scheduler { ...@@ -37,10 +35,13 @@ public class Scheduler {
@PersistenceContext @PersistenceContext
private EntityManager entityManager; private EntityManager entityManager;
// @Scheduled(cron = "0 0 8 * * MON-FRI") @Scheduled(cron = "0 0 8 * * MON-FRI")
@Scheduled(cron = "0 * * * * *") // @Scheduled(cron = "0 * * * * *")
public void cumples() { public void cumples() {
String url = "https://hooks.slack.com/services/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"; 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 // Verificar el cumpleaños de quien es
List<Birthday> cumples = birthdayRepository.findAllByFecha(new Date()); List<Birthday> cumples = birthdayRepository.findAllByFecha(new Date());
for (Birthday cumple : cumples) { for (Birthday cumple : cumples) {
...@@ -83,8 +84,8 @@ public class Scheduler { ...@@ -83,8 +84,8 @@ public class Scheduler {
} }
} }
// @Scheduled(cron = "0 0 15 * * FRI") @Scheduled(cron = "0 0 15 * * FRI")
@Scheduled(cron = "0 * * * * *") // @Scheduled(cron = "0 * * * * *")
public void beneficios() { public void beneficios() {
String url = "https://hooks.slack.com/services/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"; String url = "https://hooks.slack.com/services/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";
// Traer random // Traer random
......
...@@ -8,9 +8,9 @@ spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect ...@@ -8,9 +8,9 @@ spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.sql.init.mode=always spring.sql.init.mode=always
spring.sql.init.platform=postgres spring.sql.init.platform=postgres
#spring.datasource.url=jdbc:postgresql://localhost:5432/thumano spring.datasource.url=jdbc:postgresql://localhost:5432/thumano
#spring.datasource.username spring.datasource.username=postgres
#spring.datasource.password=postgres spring.datasource.password=postgres
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
#server.port=8888 #server.port=8888
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment