added try-catch-blocks around CronJob parsing and CronJob handling

This commit is contained in:
kmfdm 2005-08-09 12:55:23 +00:00
parent 5982de3b48
commit 9b97203b3a

View file

@ -1480,12 +1480,18 @@ public final class Application implements IPathElement, Runnable {
}
}
try {
if ((cronJobs == null) || (props.lastModified() > lastCronParse)) {
updateProperties();
cronJobs = CronJob.parse(props);
lastCronParse = props.lastModified();
}
} catch (Exception ex) {
logEvent ("error parsing CronJobs: " + ex);
ex.printStackTrace();
}
try {
Date date = new Date();
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();
try {