We currently have a few processes that looks something similar to below, they run every couple of minutes. At times this process will stop for different reasons (Agent Notified, Queued for Submission, Suberror, etc.). With Suberror we get a notification as it fails but when in agent notified or queued for submission, or possibly just executing for too long we have no notification as these processes are critical. Trying to find the best way to receive alerts when these processes stop for the different reasons. I have found I can put MAXRUNTIME=1 on the NTJOB and then the following code in the JSDELAY job and that seems notify when NTJOB has been running over a minute.
ESPCMDNM AJ CDD0810FWL1_24X7 RESET LATEEND('RESET') +
APPL(%ESPAPPL..%ESPAPGEN)
Looking for best practice to capture the other scenarios, like agent notified or queued for submission. Any ideas would be appreciated.
NT_JOB CDD0810FWL1_24X7
RUN TODAY
EXITCODE 1-9999 SUCCESS
MAXDELAY=1
AGENT CLT_A145_LNG01
USER connectd
CMDNAME D:\DATATRANS\SCRIPTS\FILEWATCHER.BAT
RESOURCE ADD(1,DRES)
RELEASE ADD(JSDELAY_CDD0810FWL1_24X7)
ENDJOB
JOB JSDELAY_CDD0810FWL1_24X7 TASK SELFCOMPLETING
RUN TODAY
ESPCMDNM AJ RETRIG_CDD0810FWL1_24X7 RESET DELAYSUB('REALNOW +
PLUS 2 MINUTES') APPL(%ESPAPPL..%ESPAPGEN)
ESPCMDNM AJ CDD0810FWL1_24X7 RESET LATEEND('RESET') +
APPL(%ESPAPPL..%ESPAPGEN)
RELEASE ADD(RETRIG_CDD0810FWL1_24X7)
ENDJOB
JOB RETRIG_CDD0810FWL1_24X7 TASK SELFCOMPLETING
RUN TODAY
ESPCMDNM RERUNM ROOTJOBS(CDD0810FWL1_24X7+) +
APPL(%ESPAPPL..%ESPAPGEN)
ENDJOB
Thank you.
Sharon