cancel
Showing results for 
Search instead for 
Did you mean: 

Overdue notifications

former_member237959
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

gmblom
Active Contributor
0 Kudos

Hello,

Overdue is not a final status. You can set the event on overdue on a definition to trigger an event when a process goes overdue and react on that.

Regards Gerben

former_member237959
Participant
0 Kudos

Hello Gerben,

Thank you. We have a job chain which needs to be triggered when ever a file arrives at a particular location. If this job won't run by 2pm everyday from monday to friday an alert needs to be triggered.

To meet this requirement, I created the job chain as both time and event dependent and scheduled the job to run everday from monday to friday at 12:01am. I created a time window on this job chain to make the job to go overdue if the job chain won't run by 2pm.


But the client still wants the job to run if the file is received after 2pm without making the job to go overdue by triggering a notification. As if the job goes to overdue there will be operator intervention which the client want to avoid.

Is there any way to acheive this scenario or is it the only way to do it. Please advise.


Thank you for your help in advance.

Regards,
Lohit

gmblom
Active Contributor
0 Kudos

Hello,

make the time window close for a short amount of time to trigger the overdue. But set the 'Status On Overdue' on the job chain to 'Scheduled', this will keep the job in an active state without needing manual interaction. The Event on overdue can be used for notification.


Regards Gerben