I think is simple to implement a self.interrupt with ScriptManager using threadId and setting a timeout with .invokeLater() maybe.
Regarding RAM, should I add a Tag Event Script to Memory Usage tag when values get upper something, try to get this threadId and kill it? Because the other day this happened
Can anyone recommend a better solution or another approach for this?
Any Pseudo - Code advice?
Indeed script does good. All inefficient algorithms were improved. It does it in few millis around 50ms.
The “slow” part if when using system.tag.queryTagHistory() for 6 months data in 1 hour interval. This functions has no timeout parameter so I want to kill the thread if querying data takes too long.
Limiting the start and end date if not an option for customer.
The hardware there is just a local testing machine haha