Set ALERT when a job finishes and another job has not started within 60 minutes.
search cancel

Set ALERT when a job finishes and another job has not started within 60 minutes.

book

Article ID: 387223

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

Need to verify when a job has finished and another job has not started within 60 minutes.  If job doesn't start within 60 minutes of the other job completion we need to alert programming team.

Environment

Component: ESP Workload Automation
Release:  ALL

Resolution

JOB1 completes and releases MON_TASK. MON_TASK will reset the LATEEND time of JOB2.  

JOB JOB1               
   RELEASE ADD(MON_TASK)  ===> Self completing task is released
   RUN WORKDAYS            
   NORUN HOLIDAY                              
ENDJOB

JOB MON_TASK TASK SELFCOMPLETING                                     
   RUN DAILY                                                        
   ESPNOMSG AJ JOB2 RESET LATEEND('REALNOW +           
   PLUS 60 MINUTES') APPL(%ESPAPPL..%ESPAPGEN)    ===> This will reset the lateend of the job that needs to run within 60 mins                    
ENDJOB   

JOB JOB2              
   RUN WORKDAYS            
   NORUN HOLIDAY  
   NOTIFY OVERDUE MAILBOX(xxx4)
   NOTIFY OVERDUE MAILBOX(xxxxxx) SUBJECT('JOB2 is LATE +
   PLEASE CALL xxx4 ONCALL')                            
ENDJOB