# Enable/Disable Gateway scripts

**URL:** <https://forum.inductiveautomation.com/t/enable-disable-gateway-scripts/5566>\
**Category:** Ignition\
**Created:** [December 12, 2012, 11:48am UTC](https://forum.inductiveautomation.com/t/enable-disable-gateway-scripts/5566 "2012-12-12T11:48:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hardy](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@Hardy](https://forum.inductiveautomation.com/u/Hardy)\
**Post date:** [December 12, 2012, 11:48am UTC](https://forum.inductiveautomation.com/t/enable-disable-gateway-scripts/5566/1 "2012-12-12T11:48:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [December 12, 2012, 4:19pm UTC](https://forum.inductiveautomation.com/t/enable-disable-gateway-scripts/5566/2 "2012-12-12T16:19:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Subin\_Adhikari](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Subin\_Adhikari](https://forum.inductiveautomation.com/u/Subin_Adhikari)\
**Post date:** [February 26, 2024, 3:08pm UTC](https://forum.inductiveautomation.com/t/enable-disable-gateway-scripts/5566/3 "2024-02-26T15:08:38Z")

</div>

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](https://forum.inductiveautomation.com/t/enable-disable-gateway-timer-using-script/38164/2)

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

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 26, 2024, 3:14pm UTC](https://forum.inductiveautomation.com/t/enable-disable-gateway-scripts/5566/4 "2024-02-26T15:14:04Z")

</div>

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