# Running Gateway Event Scripts on Backup Server

**URL:** <https://forum.inductiveautomation.com/t/running-gateway-event-scripts-on-backup-server/24763>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [May 7, 2019, 6:23pm UTC](https://forum.inductiveautomation.com/t/running-gateway-event-scripts-on-backup-server/24763 "2019-05-07T18:23:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul.bouillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.bouillon/32/7980_2.png) [@paul.bouillon](https://forum.inductiveautomation.com/u/paul.bouillon)\
**Post date:** [May 7, 2019, 6:23pm UTC](https://forum.inductiveautomation.com/t/running-gateway-event-scripts-on-backup-server/24763/1 "2019-05-07T18:23:56Z")

</div>

Hello all,

Was wondering if there is a mechanism for allowing gateway event scripts to execute on the redundant/non-active ignition gateway – was hoping to collect diagnostics on all of my gateway machines regardless of their duty/standby state (would prefer to know if we have an issue with our backup gateway before we fail over to it!).

I currently have my diagnostics gathering/logging running as a “timer” script.

Thanks!

-Paul

---

<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:** [May 7, 2019, 6:44pm UTC](https://forum.inductiveautomation.com/t/running-gateway-event-scripts-on-backup-server/24763/2 "2019-05-07T18:44:09Z")

</div>

There’s no such mechanism.

---

<div class="post-metadata">

**Author:** ![paul.bouillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.bouillon/32/7980_2.png) [@paul.bouillon](https://forum.inductiveautomation.com/u/paul.bouillon)\
**Post date:** [May 7, 2019, 6:59pm UTC](https://forum.inductiveautomation.com/t/running-gateway-event-scripts-on-backup-server/24763/3 "2019-05-07T18:59:33Z")

</div>

ok – thanks Kevin

Assuming the only way would be to write a custom module? Or would the module not execute while the gateway is in “standby” either?

---

<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:** [May 7, 2019, 7:05pm UTC](https://forum.inductiveautomation.com/t/running-gateway-event-scripts-on-backup-server/24763/4 "2019-05-07T19:05:37Z")

</div>

Modules still load and run and decide what to do with redundancy status.

I’m not sure what you’d be listening to to decide to execute, and what execute would mean in the context of your own module.

---

<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:** [May 8, 2019, 12:30pm UTC](https://forum.inductiveautomation.com/t/running-gateway-event-scripts-on-backup-server/24763/5 "2019-05-08T12:30:24Z")

</div>

Consider using an external (i.e., not in Ignition) webserver health checker. Something that hits Ignition’s `/main/StatusPing` address on some useful interval. (Use just `/StatusPing` on v8.0.)

---

<div class="post-metadata">

**Author:** ![paul.bouillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.bouillon/32/7980_2.png) [@paul.bouillon](https://forum.inductiveautomation.com/u/paul.bouillon)\
**Post date:** [May 8, 2019, 5:18pm UTC](https://forum.inductiveautomation.com/t/running-gateway-event-scripts-on-backup-server/24763/6 "2019-05-08T17:18:31Z")

</div>

Thanks @pturmel – will definitely consider for some of the high level info… was trying to adapt the Ignition Diagnostics script embedded in the “Ignition Diagnostics” UDT that was shared at the [Ignition CIC](https://ignitioncic.com/) this year → gateway event script.  
I have it working with all of my “master” gateways – but am only able to get the “backup” gateway info to log while I force the failover… was hoping that some of the non-licensed functionality (e.g. gateway event scripts?) would run if I had redundancy standby activity level set to “warm”

Was hoping to log Ignition-specific info like status of database connections, tag providers, tag groups/scan classes, error logs, etc. – not sure if it is possible to do this with an external tool like you mentioned (e.g. outside of the gateway context)

 ![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/35ed2241e4eb68792aeddb20059055aa745a2b55.png)
