ESP Workload Automation

 View Only

 Can I use 1 ALERTDEF to resubmit multiple failed jobs?

Keith Grizzell's profile image
Keith Grizzell posted Feb 08, 2023 12:18 PM
Hello,
I created an ALERTDEF to resubmit a failed file trigger 5 minutes after it fails and it works just as it should. My question is can the same ALETDEF be used on multiple file monitors with out causing any issues?

I ask because we have recently added dozens of file triggers and have issues on server patching Sundays with the file monitors failing when a server reboots that has a folder/path the file trigger is monitoring. 

We are not staffed on Sunday's but someone has to login on patching Sunday's to resubmit the failed file triggers that the patching caused.

Keith
Rick Romanowski's profile image
Rick Romanowski

As long as you are using Monitor variables, I would expect it to work.

An example from the documentation:

Resubmit job 5 minutes after it fails (broadcom.com)

Can you post details on your solution?

Keith Grizzell's profile image
Keith Grizzell
Job:
FILE_TRIGGER TESTING1
AGENT VMINAPP03
USER GMCC\ESPADMINNONPRD
FILENAME '\\gmcc.grange.local\EA\CLAIMSMDL\IT\BulkInvoice\Enterprise\+
TOCLAIMCENTER\*.ZIP' UPDATE
RUN DAILY
NOTIFY FAILURE ALERT(FAIL)
ENDJOB

ALERTDEF:

oper alertdef id(FAIL)
ALERT ID EVENT NAME
FAIL SPRODID.RESUB_JOB

EVENT SPRODID.RESUB_JOB runs PROC RESUBMIT with below coding in it:
IF ESPREEXEC#=0 THEN DO
REEXEC IN(5)
ENDDO
ELSE ESP AJ %MNFULLNAME RESUB APPL(%MNAPPL..%MNAPPLGEN)

I wasn't sure if I had multiple file triggers fail at the same time if it would cause an issue with my event being triggered multiple times so close together.
Rick Romanowski's profile image
Rick Romanowski

What we have done to single-thread actions.

Created an EICLASS with Max 1

OPER EICLASS CLASS(1)
Class 1: Current=1, Max=1, Active=0


Then added the EICLASS to an Event.

Not sure how that would work with your solution.

You may need to create an APPL/PROC that does the AJ command to RESUB

And add the EICLASS to its event definition.

EVENT ID(<Event ID>) EICLASS(1)