on ‎2015 Feb 04 6:51 PM
Hi,
How do we configure cronjob execution to send emails if the job fails i.e. Aborted or Error status?
I think hybris only sends email in case the job execution is successful.
Do we have to extend the default functionality?
Regards, Mandar
Request clarification before answering.
Hmm.. Let me get back to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No. It doesn't. You will need to configure it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Saiteja, Here you go https://wiki.hybris.com/display/pskb/Cronjob+Monitoring+Extension
Does hybris send an email notification on cronjob failure?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, you can create a scripting job using Groovy, and make it run every X minutes and check for the running jobs status. If it finds any issues, send out an e-mail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hybris sends email for all the cases i.e. Success, Failure, Error, Unknown.
If you could see "sendEmail(CronJobResult cronJobResult)" method you will notice
public void sendEmail(CronJobResult cronJobResult)
throws EmailException
...
if (getResult().getCode().equals(GeneratedCronJobConstants.Enumerations.CronJobResult.SUCCESS))
{
String subject = Config.getParameter(Config.Params.CRONJOB_MAIL_SUBJECT_SUCCESS);
MailUtils.validateParameter(subject, Config.Params.CRONJOB_MAIL_SUBJECT_SUCCESS);
}
else
{
subject = Config.getParameter(Config.Params.CRONJOB_MAIL_SUBJECT_FAIL);
MailUtils.validateParameter(subject, Config.Params.CRONJOB_MAIL_SUBJECT_FAIL);
}
...
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.