Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
th-app-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oscar Enrique Gonzalez Escurra
th-app-java
Commits
c270a5ab
Commit
c270a5ab
authored
Mar 20, 2023
by
Oscar Gonzalez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commits para que Sofia empiece
parent
9a58b825
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
curriculumsearch/src/main/java/com/roshka/service/Scheduler.java
+7
-6
curriculumsearch/src/main/resources/application.properties
+3
-3
No files found.
curriculumsearch/src/main/java/com/roshka/service/Scheduler.java
View file @
c270a5ab
...
@@ -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
...
...
curriculumsearch/src/main/resources/application.properties
View file @
c270a5ab
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment