Python's Timer: from threading import Timer

No. The Script Hint Scope just lets you chose what types of functions it will hint you for. For instance if you set it to Client, then you wont see functions that can only run in the gateway. It's just a "Hint" to what you can use. It doesn't play any role in what scope the script is actually executed in.

Are you testing this in the Designer or in a real Session?

system.util.invokeLater() has a delay parameter.

https://docs.inductiveautomation.com/display/DOC81/system.util.invokeLater

I think you're headed down a perilous road here. How do you plan to manage the life cycle of these threads? I see no way to halt or interrupt the timer. What happens if the gateway service needs to be rebooted? Or the project is saved restarting scripting?

See this for some more pertinent information

1 Like