# Trigger a script from outside

**URL:** <https://forum.inductiveautomation.com/t/trigger-a-script-from-outside/63678>\
**Category:** Ignition\
**Created:** [September 1, 2022, 2:39pm UTC](https://forum.inductiveautomation.com/t/trigger-a-script-from-outside/63678 "2022-09-01T14:39:24Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 1, 2022, 3:08pm UTC](https://forum.inductiveautomation.com/t/trigger-a-script-from-outside/63678/4 "2022-09-01T15:08:07Z")

</div>

A few posts that may help,

> [@Gateway Script to monitor directory for new files](https://forum.inductiveautomation.com/t/gateway-script-to-monitor-directory-for-new-files/16124/1):
>
> Hi, I’m looking for some advice as to the best way to monitor a network directory location for new files. We have an external provider that FTP’s files into a specific directory on our network, and I would like the Ignition Gateway to monitor this directory and read in the new file as a string. From that point, I have some XML parsing code written and tested, I just can’t figure out how to monitor and get new files read in. (For completeness - once I have read and parsed the file I will move i…

> [@Managing multiple asynchronous threads](https://forum.inductiveautomation.com/t/managing-multiple-asynchronous-threads/37185):
>
> I've followed this post for monitoring a directory for file changes and I think I have created more than one watch service in different threads. How do I monitor, manage, and delete these threads?

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.

---

_[View the full topic](https://forum.inductiveautomation.com/t/trigger-a-script-from-outside/63678)._
