# Gateway tag change and scheduled event scripts stopped running

**URL:** <https://forum.inductiveautomation.com/t/gateway-tag-change-and-scheduled-event-scripts-stopped-running/64415>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 23, 2022, 11:59am UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-and-scheduled-event-scripts-stopped-running/64415 "2022-09-23T11:59:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 23, 2022, 11:59am UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-and-scheduled-event-scripts-stopped-running/64415/1 "2022-09-23T11:59:55Z")

</div>

Ignition 8.1.20

I realised that one of my Perspective applications wasn’t collecting data. The status log reported

 ![Gateway event scripts](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/1/1198cecdb6d0fae0462abe5121c64415f68380e7.png)

`File "", line 3, in NameError: name 'productionLogging' is not defined`

> **Details**
>
> ```auto
> com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File "", line 3, in NameError: name 'productionLogging' is not defined
> at org.python.core.Py.NameError(Py.java:261)
> at org.python.core.PyFrame.getname(PyFrame.java:257)
> at org.python.pycode._pyx4221.f$0(:3)
> at org.python.pycode._pyx4221.call_function()
> at org.python.core.PyTableCode.call(PyTableCode.java:173)
> at org.python.core.PyCode.call(PyCode.java:18)
> at org.python.core.Py.runCode(Py.java:1687)
> at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:796)
> at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:819)
> at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:748)
> at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:800)
> at com.inductiveautomation.ignition.common.script.TagChangeScriptExecutor$TagChangeExecutionCallback.execute(TagChangeScriptExecutor.java:242)
> at com.inductiveautomation.ignition.common.script.TagChangeScriptExecutor$TagChangeExecutionCallback.execute(TagChangeScriptExecutor.java:194)
> at com.inductiveautomation.ignition.common.util.SerialExecutionQueue$PollAndExecute.run(SerialExecutionQueue.java:102)
> at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
> at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.base/java.lang.Thread.run(Unknown Source)
> Caused by: org.python.core.PyException: NameError: name 'productionLogging' is not defined
> ... 19 common frames omitted
> 
> ```

`productionLogging` is defined and listed.

![Gateway scripting tree](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/3/23d9795fc430f8ac22858fd8543a6f28467a6849.png)

I opened the project and saved it without changing anything and it and the scripts are now executing.

Has anyone seen a similar problem?

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 23, 2022, 2:10pm UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-and-scheduled-event-scripts-stopped-running/64415/2 "2022-09-23T14:10:04Z")

</div>

Could have to do with something internal failing and needing the gateway scripts to restart. When you opened the project and saved, you updated the session props time stamp and that triggered a project refresh.

Which in turn would have re-created all of the scripting and essentially fixed whatever bug was present.

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [September 23, 2022, 3:57pm UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-and-scheduled-event-scripts-stopped-running/64415/3 "2022-09-23T15:57:08Z")

</div>

I’m on a older version (8.1.15) and I’ve seen this issue creep up from time to time.

I think I’ve seen it on numerous versions of 8.1.x. No idea what causes it and it happens infrequently (once every couple of months if that)

I usually just restart and move on with my day

---

<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:** [September 23, 2022, 10:54pm UTC](https://forum.inductiveautomation.com/t/gateway-tag-change-and-scheduled-event-scripts-stopped-running/64415/4 "2022-09-23T22:54:34Z")

</div>

If you do anything that doesn’t finish (infinite or really long wait) within an event, that event can’t run again. In most cases, someone is using either `sleep()` of some kind, or `while True:`, or both.
