Commit 2fd3399b by Billy Larru

estableciendo hora de ejecucion para el planificador de tareas

parent eae407e0
...@@ -23,7 +23,7 @@ public class Main { ...@@ -23,7 +23,7 @@ public class Main {
scheduler = sf.getScheduler(); scheduler = sf.getScheduler();
JobDetail job = newJob(ProgramarSalidasJob.class).withIdentity("job1", "group1").build(); 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(); .build();
scheduler.scheduleJob(job, trigger); scheduler.scheduleJob(job, trigger);
......
...@@ -65,7 +65,7 @@ public class ProgramarSalidasJob implements Job{ ...@@ -65,7 +65,7 @@ public class ProgramarSalidasJob implements Job{
scheduler = sf.getScheduler(); scheduler = sf.getScheduler();
JobDetail job = newJob(GenerarSalidasJob.class).withIdentity(jobName, "groupSalida1").build(); 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]); cronExpression = String.format(cronExpression, splitHora[1], splitHora[0]);
CronTrigger trigger = newTrigger().withIdentity("triggerSalida"+jobName, "groupSalida1").withSchedule(cronSchedule(cronExpression)) CronTrigger trigger = newTrigger().withIdentity("triggerSalida"+jobName, "groupSalida1").withSchedule(cronSchedule(cronExpression))
......
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