Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SalidasAutomaticas
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Billy Larru
SalidasAutomaticas
Commits
2fd3399b
Commit
2fd3399b
authored
Apr 04, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
estableciendo hora de ejecucion para el planificador de tareas
parent
eae407e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Main.java
src/salidasautomaticas/main/Main.java
+3
-3
ProgramarSalidasJob.java
src/salidasautomaticas/schedule/ProgramarSalidasJob.java
+1
-1
No files found.
src/salidasautomaticas/main/Main.java
View file @
2fd3399b
...
...
@@ -22,12 +22,12 @@ public class Main {
try
{
scheduler
=
sf
.
getScheduler
();
JobDetail
job
=
newJob
(
ProgramarSalidasJob
.
class
).
withIdentity
(
"job1"
,
"group1"
).
build
();
CronTrigger
trigger
=
newTrigger
().
withIdentity
(
"trigger1"
,
"group1"
).
withSchedule
(
cronSchedule
(
"
30 15 *
* * ?"
))
CronTrigger
trigger
=
newTrigger
().
withIdentity
(
"trigger1"
,
"group1"
).
withSchedule
(
cronSchedule
(
"
0 43 15
* * ?"
))
.
build
();
scheduler
.
scheduleJob
(
job
,
trigger
);
scheduler
.
start
();
}
catch
(
SchedulerException
ex
)
{
Logger
.
getLogger
(
Main
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
...
...
src/salidasautomaticas/schedule/ProgramarSalidasJob.java
View file @
2fd3399b
...
...
@@ -65,7 +65,7 @@ public class ProgramarSalidasJob implements Job{
scheduler
=
sf
.
getScheduler
();
JobDetail
job
=
newJob
(
GenerarSalidasJob
.
class
).
withIdentity
(
jobName
,
"groupSalida1"
).
build
();
String
cronExpression
=
"
%s %s *
* * ?"
;
String
cronExpression
=
"
0 %s %s
* * ?"
;
cronExpression
=
String
.
format
(
cronExpression
,
splitHora
[
1
],
splitHora
[
0
]);
CronTrigger
trigger
=
newTrigger
().
withIdentity
(
"triggerSalida"
+
jobName
,
"groupSalida1"
).
withSchedule
(
cronSchedule
(
cronExpression
))
...
...
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