# Gateway Timer scripts mysteriously stopped

**URL:** <https://forum.inductiveautomation.com/t/gateway-timer-scripts-mysteriously-stopped/7453>\
**Category:** Ignition\
**Created:** [October 23, 2013, 1:54pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-scripts-mysteriously-stopped/7453 "2013-10-23T13:54:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [October 23, 2013, 1:54pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-scripts-mysteriously-stopped/7453/1 "2013-10-23T13:54:57Z")

</div>

I have two Gateway Timer scripts which both stopped running yesterday. According to the Gateway Scripts Status page, one posts requests to an URL at 30 second intervals, and last executed at 12:14:51; the other checks a directory for new files every 10 seconds, and last executed at 12:15:18. These are the only two active scripts on this Gateway.

I’ve taken a look in the logs, and I don’t see anything indicating a problem at those times, or at the times that I would have expected them to execute again. Both scripts are set as Enabled, they’re just not running.

Should I just disable and then re-enable them to start them up again? And what else can I look for to figure out why this happened?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 23, 2013, 2:51pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-scripts-mysteriously-stopped/7453/2 "2013-10-23T14:51:00Z")

</div>

Can you grab a thread dump and post it here? You can do this at the bottom of the Console \> Threads page.

---

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [October 23, 2013, 5:59pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-scripts-mysteriously-stopped/7453/3 "2013-10-23T17:59:38Z")

</div>

The dump is attached.

Thanks!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 23, 2013, 6:08pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-scripts-mysteriously-stopped/7453/4 "2013-10-23T18:08:03Z")

</div>

Well, my guess is that since you’re using a shared timer for the Asheville project, that one of the scripts is stuck trying to read from a socket during an HTTP Post call you made in one of your scripts, and the others simply aren’t getting a turn to run right now.

Unfortunately the httpPost() scripting call has no timeout parameters like the httpGet() one does, so we’ll have to add those…

---

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [October 23, 2013, 6:19pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-scripts-mysteriously-stopped/7453/5 "2013-10-23T18:19:31Z")

</div>

The device that I’m posting to did have a “critical error” as the users put it, and they rebooted it, so maybe the timing was just right to get that script stuck on the read. In the meantime, can I prevent this from recurring by changing the script to run in a dedicated thread? Or will that not make any difference? Is there a global setting that could give me a timeout value in place of the missing parameter?

And to get this running again, do I disable and then re-enable it?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 23, 2013, 6:31pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-scripts-mysteriously-stopped/7453/6 "2013-10-23T18:31:25Z")

</div>

Yeah, you’ll probably need to disable/enable, maybe with a project save mixed in there somewhere.

You could set each timer script to dedicated for now, which would mean that if it got hung up again only that one would be affected, but the real solution will be to wait for 7.6.4 which will have connect and read timeout parameters for the httpPost() call.

---

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [October 23, 2013, 6:45pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-scripts-mysteriously-stopped/7453/7 "2013-10-23T18:45:39Z")

</div>

I actually just downloaded 7.6.4-rc2 as that is supposed to fix a problem we’ve been having with Allen-Bradley devices. But I assume this fix will be in a future release candidate.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 23, 2013, 6:46pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-scripts-mysteriously-stopped/7453/8 "2013-10-23T18:46:47Z")

</div>

Yeah, hopefully rc3. If not that then final.
