Enable/Disable Gateway scripts

Is there a way to Enable/Disable a gateway script (timer or tag change) in a script?

There is nothing builtin. However, you can use a memory boolean tag to toggle when the script will run. The script would check the value of the tag before it does anything like this:if system.tag.read("Path/To/MemoryTag").value == 1: your code here....So if you write a value of 0 to the memory tag the script will not run.

1 Like

has anything changed here? can we enable/disable a gateway timer from script?
I have timer running every 1 second to detect shift / break change,

I've been doing this Enable/Disable gateway timer using script - #2 by pturmel

but it would be great to have enable / disable feature.

No, it is so trivial to include a flag check in your code that I suspect it isn't even being considered by IA.

4 Likes