# Calling an ignition script from a separate program

**URL:** <https://forum.inductiveautomation.com/t/calling-an-ignition-script-from-a-separate-program/101468>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [January 28, 2025, 4:48am UTC](https://forum.inductiveautomation.com/t/calling-an-ignition-script-from-a-separate-program/101468 "2025-01-28T04:48:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 4:48am UTC](https://forum.inductiveautomation.com/t/calling-an-ignition-script-from-a-separate-program/101468/1 "2025-01-28T04:48:24Z")

</div>

I have an ignition script that I want to be called by another program (likely a powershell script running as a windows service). There are a couple ways i'd naively think to do this, namely 'attaching the script to a tag update event, then having the other script set that tag' but that seems pretty ugly. Is there any way to directly call ignition scripts from a CLI?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 28, 2025, 4:59am UTC](https://forum.inductiveautomation.com/t/calling-an-ignition-script-from-a-separate-program/101468/2 "2025-01-28T04:59:03Z")

</div>

You could use the web dev module to expose a function via a rest api and call it from that?  
You could use node red to toggle a tag and trigger an onchange event

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:04am UTC](https://forum.inductiveautomation.com/t/calling-an-ignition-script-from-a-separate-program/101468/3 "2025-01-28T05:04:09Z")

</div>

Thanks, this is great!

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 2:16pm UTC](https://forum.inductiveautomation.com/t/calling-an-ignition-script-from-a-separate-program/101468/4 "2025-01-28T14:16:37Z")

</div>

Is there any way to have that function available gateway-wide? or should I just create a new project and attach it to that

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 28, 2025, 4:20pm UTC](https://forum.inductiveautomation.com/t/calling-an-ignition-script-from-a-separate-program/101468/5 "2025-01-28T16:20:27Z")

</div>

Webdev resources are always scoped within some project.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 28, 2025, 10:09pm UTC](https://forum.inductiveautomation.com/t/calling-an-ignition-script-from-a-separate-program/101468/6 "2025-01-28T22:09:19Z")

</div>

Functions themselves can be made global by putting them in the project assigned as the [gateway scripting project](https://www.docs.inductiveautomation.com/docs/8.1/platform/scripting/scripting-in-ignition/project-library#gateway-scripting-project)

---

<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:** [January 28, 2025, 11:02pm UTC](https://forum.inductiveautomation.com/t/calling-an-ignition-script-from-a-separate-program/101468/7 "2025-01-28T23:02:26Z")

</div>

> [@nminchin](#):
>
> can be made global by putting them in the project assigned as the [gateway scripting project](https://www.docs.inductiveautomation.com/docs/8.1/platform/scripting/scripting-in-ignition/project-library#gateway-scripting-project)

No. The gateway scripting project setting is only referenced for scripts that run outside of projects, like tag events.

To make a library function reachable everywhere, place it in an inheritable project that **all** other projects, including the GSP, inherit from.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 28, 2025, 11:08pm UTC](https://forum.inductiveautomation.com/t/calling-an-ignition-script-from-a-separate-program/101468/8 "2025-01-28T23:08:09Z")

</div>

Oops, my bad terminology
