Trigger a script from outside


I have a script that I would like to run when something happen from outside of the gateway.
For example I have a script that import tags from json file and I have an external system that produce those json files, I would like to have the possibility to deploy automatically the changes without any human action.
So for example is it possible to trigger a script every time there is a new file in a folder on the gateway?
Or maybe it is possible to send a message to the gateway with an external API and use the message handler of the gateway event script?


  1. Java can monitor a folder for changes, though you need a long-lived thread. That has serious memory leak hazards if not cleaned up at the correct times (project restarts in particular).

  2. The WebDev module is specifically designed to expose an API to external callers. You have total control via scripting how Ignition responds. Consider having the external system simply POST the new JSON file to Ignition this way.

1 Like

Depending on your needs you may also be able to get away with a gateway timer script checking the folder periodically.


A few posts that may help,

Using a timer is probably the easiest and best, unless you’re interested if files change, then the file watcher may be what you want.