added try-catch-blocks around CronJob parsing and CronJob handling
This commit is contained in:
parent
5982de3b48
commit
9b97203b3a
1 changed files with 64 additions and 55 deletions
|
@ -1480,12 +1480,18 @@ public final class Application implements IPathElement, Runnable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
if ((cronJobs == null) || (props.lastModified() > lastCronParse)) {
|
if ((cronJobs == null) || (props.lastModified() > lastCronParse)) {
|
||||||
updateProperties();
|
updateProperties();
|
||||||
cronJobs = CronJob.parse(props);
|
cronJobs = CronJob.parse(props);
|
||||||
lastCronParse = props.lastModified();
|
lastCronParse = props.lastModified();
|
||||||
}
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
logEvent ("error parsing CronJobs: " + ex);
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
List jobs = new ArrayList(cronJobs);
|
List jobs = new ArrayList(cronJobs);
|
||||||
|
|
||||||
|
@ -1543,7 +1549,10 @@ public final class Application implements IPathElement, Runnable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
logEvent("error handling CronJobs: " + ex);
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
long sleepInterval = CronJob.millisToNextFullMinute();
|
long sleepInterval = CronJob.millisToNextFullMinute();
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue