Get a script's sleep interval programmatically - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Get a script's sleep interval programmatically (/showthread.php?tid=3531) |
Get a script's sleep interval programmatically - morkovka - 27.08.2021 Hi, Is it possible to retrieve the value of the sleep interval of a resident script programmatically? I can retrieve the scripts' object using "script.get('script name')" which includes the script id/type/status but it doesn't include the sleep interval configured for the script unfortunatley. RE: Get a script's sleep interval programmatically - morkovka - 28.08.2021 Found out how to do it, for anyone else interested: Code: script_id = script.get(_SCRIPTNAME).id RE: Get a script's sleep interval programmatically - admin - 30.08.2021 What is the use case for this? RE: Get a script's sleep interval programmatically - morkovka - 30.08.2021 I wanted to use it in the function that measures the wiser performance metrics (knx load, cpu, memory) - for the knx load it assumed a certain amount of time passed since last invocation (60 sec) to calculate the load. |