setStatus(CANCELED);
nextRunTime = null;
}
private void warnExceptionByEmail(Exception e) {
SimpleEmail email = new SimpleEmail(this.mailSmtp);
try {
email.setFrom(this.mailFrom, getName());
for (int i = 0; i < this.mailsTo.size(); i++) {
email.addTo((String)mailsTo.get(i));
}
email.setSubject(getName() + " Exception: " + e.getMessage());
StringBuffer message = new StringBuffer();
message.append("Foi lan�ada uma excep��o pelo Daemon " + getName() + " causando o fim da sua execu��o � seguinte data: " + new DateTime(new java.util.Date()));
message.append("\n\nStack Trace:\n");
message.append("\t" + StringUtil.toString(e));
email.setMsg(message.toString());
email.send();
} catch (Exception mailException) {
logger.warning("Error sending exception mail: " + mailException);
}
}