Hi Frank,
I suggest that you use APPLSTART & APPLEND in both APPL A & B, as well as global variable:
APPLSTART WAIT
/* retrieve the time when the jobs can run*/
VGET NEXTRUNTIME TABLE(WAIT)
DELAYSUB %NEXTRUNTIME
ENDJOB
....
APPLEND RESET
/* generate the time for 6 minutes later*/
GENTIME RR REALNOW PLUS 6 MINUTES
/* set variable value to be the time of 6 minutes later*/
VSET NEXTRUNTIME %RRTIME TABLE(WAIT)
ENDJOB
Hope this helps,
Lucy
Original Message:
Sent: 09-10-2019 02:46 PM
From: Frank Korfias
Subject: Wait X time if other application finished within the last 6 minutes
I have a user asking me the following:
Do you have examples of ESP applications that wait a specified amount of time for other ESP applications to complete before the original application runs?
Specifically what I'm trying to do is make sure application A and B never run within 6 minutes of one another. So, when application A starts, it checks for the last completion of B. If B has run within the last 6 minutes, A waits 6 minutes past the completion of B before it actually runs. The same type of logic would be put in B to check for A's completion.
I do not have any examples of this, so I am reaching out to the communities to see who has code for this.
Thanks,
Frank