# Gateway Timer Script to compare conditions, then send Msg Handler

**URL:** <https://forum.inductiveautomation.com/t/gateway-timer-script-to-compare-conditions-then-send-msg-handler/99907>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 16, 2024, 7:51pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-script-to-compare-conditions-then-send-msg-handler/99907 "2024-12-16T19:51:59Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [December 17, 2024, 8:12pm UTC](https://forum.inductiveautomation.com/t/gateway-timer-script-to-compare-conditions-then-send-msg-handler/99907/5 "2024-12-17T20:12:13Z")

</div>

> [@dkhayes117](#):
>
> Since you want to call this from the gateway, make sure to put the project script in your global scripting project. Scripts in this designated project can be called from the gateway scope.

This is not correct for buttons. Buttons belong to user interfaces in projects, so must use library scripts in that project or its parents. The gateway scripting project covers tags and any other non-project resource.

> [@paul-griffith](#):
>
> cause conflicts between the automatically loaded instances and the ones you're explicitly importing.

More details on this here:

> [@\[IGN-6503\]Project Library Script Initialization Races](https://forum.inductiveautomation.com/t/ign-6503-project-library-script-initialization-races/98636):
>
> Are you annoyed by pseudo-random breakage in Ignition project library scripting? Odd top-level constants being garbled, or operations in the top level that have side effects running twice? Or more? Not happening much, but always around project edits, and sometimes even on gateway restart? Yeah, me too. frowning_face Poking around under the hood back in the spring, for a module development task, I ran across some problematic IA bytecode and pinged some people. But it went nowhere, as I co…

---

_[View the full topic](https://forum.inductiveautomation.com/t/gateway-timer-script-to-compare-conditions-then-send-msg-handler/99907)._
