Is there a system-util-invokelater for Perspective?

I have the same question as this topic below, is this still the recommended way for 8.1.52?

Create an expression of NOW(1000) with a corresponding script transform? Thanks!

https://forum.inductiveautomation.com/t/alternative-to-system-util-invokelater-in-perspective-script/40778

My later.py script has a gateway-scope substitute for invokeLater.

It is efficient, but does not carry perspective scope details into the thread environment. It is also gateway-wide, not specific to one client.

1 Like

Thanks, I’ll check it out

If it will be used heavily, and for making delays without sleep, consider making a scheduled thread pool executor with a larger pool. Same technique as shown in later.py.

Periscope has a system.perspective.invokeOnQueue function that supports a delay parameter:

This is really only intended for scheduling property writes. If you do any work that severely blocks the queue you're going to have a bad time.

2 Likes