Triggering multiple Tag Change scripts from one tag

I have 5 gateway scripts triggered from a multitude of tags. One tag is common to all 5 scripts and should trigger all 5 to run. Each script contains various read and writes to a DB etc… The problem seems to be that when the tag changes not all the scripts run. Different ones run on different occasions. The tag is a memory tag and when when set to a 1 triggers the scripts.

Is it good practise to trigger as many (or more than one) script from a tag or should this be fool proof and I need to look somewhere else for the issue.

A tag should be able to act as trigger for any number of scripts.

Put some print statements at the top of your scripts so you can see when they’re being invoked and see where that leads you.

I’ve been doing a lot of this and found using the logger to log messages to the console to be very helpful in debugging.

logger = system.util.getLogger("MyLogger")
logger.info("Some message")

I’ve also gotten into the habit of trapping exceptions and logging those:

try:
     A bunch of code....
except :
     import sys
     sourceName = "ScriptName"
     logger = system.util.getLogger("MyLogger")
     logger.error(str(sys.exc_info()[1]) + " - Source: " + sourceName )