Trigger a script from outside

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.