-
1. Re: Create CTO rule IEC070I for triggering once a day for variable %%JOBNAME
Paul Robins Nov 13, 2019 4:16 PM (in response to Pavel Grund)1 of 1 people found this helpfulHi Pavel,
Limiting the number of rule triggers for specific jobs on a generic message can be difficult. By suppressing the message for one job, you may inadvertently suppress the message for a different job.
Assuming the IEC070I is issued under the JOB or STC name, I would consider setting a global variable containing a timestamp and the jobname then checking the existence\age of the variable before alerting. This way you will not ignore any IEC070I messages and all processing will be per jobname. If you're worried about the number of global variables this could create you could have a daily or weekly rule that removes the variables when the TIMEDIFF reaches a certain value.
e.g.
DO SET = %%NOW = %%$YEAR.%%$JULDAY.%%$TIME GLOBAL N
IF %%IEC070I_%%JOBNAME EQ %%$UNDEF
DO SET = %%IEC070I_%%JOBNAME = 00001000001 GLOBAL Y
ENDIF
DO SET = %%TIMEDIFF = %%$TIMEINT %%IEC070I_%%JOBNAME %%NOW GLOBAL N
IF %%TIMEDIFF GT# 500
DO SHOUT = TO OPER-14 URGENCY V SYSTEM CTO282I
MESSAGE %%$MSG
DO SET = %%IEC070I_%%JOBNAME = %%NOW GLOBAL Y
ENDIF