try {
Thread.currentThread().sleep((long) waitTime * 1000);
} catch (Exception ignore) {}
if (!myJobQueue.isEmpty()) {
JobSpec exec = null;
try {
exec = myJobQueue.getNextJob();
LOG.log(Level.INFO, "Obtained Job: ["
+ exec.getJob().getId()
+ "] from Queue: Scheduling for execution");
} catch (Exception e) {
LOG.log(Level.WARNING,
"Error getting next job from JobQueue: Message: "
+ e.getMessage());
continue;
}
try {
schedule(exec);
} catch (Exception e) {
LOG.log(Level.WARNING, "Error scheduling job: ["
+ exec.getJob().getId() + "]: Message: "
+ e.getMessage());
// place the job spec back on the queue
try {
myJobQueue.requeueJob(exec);
} catch (Exception ignore) {