Hi All,
We are able to receive notifications for jobs which are errored or Killed with the below trigger. But we are not receiving the notifications for 'overdue' jobs.
{
String strLogFileName = "";
if((jcsPostRunningContext.getNewStatus().equals(JobStatus.Error) ||
jcsPostRunningContext.getNewStatus().equals(JobStatus.Overdue) ||
jcsPostRunningContext.getNewStatus().equals(JobStatus.Killed))
)
{
{
String email = "abc@ghi.com";
String subject = "Redwood job abend";
String strText = "Job id=" + jcsJob.getJobId().intValue() + ", Job name=" + jcsJob.getJobDefinition().getName() + ", Job Description=" + jcsJob.getDescription() + " , has abended";
JobDefinition jd = jcsSession.getJobDefinitionByName("System_Mail_Send");
{
Job subJob = jd.prepare();
subJob.getJobParameterByName("To").setInValueString(email);
subJob.getJobParameterByName("Subject").setInValueString(subject);
subJob.getJobParameterByName("Text").setInValueString(strText);
}
}
}
}
Can any one please advise..do I need to add any extra lines of code to receive notifications for overdue jobs.
Regards,
Lohit