This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Get a script's sleep interval programmatically
#1
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.
Thank you!
Morkov
Reply
#2
Found out how to do it, for anyone else interested:

Code:
script_id = script.get(_SCRIPTNAME).id
script_timer = db:getrow('SELECT params FROM scripting where id = ?', script_id).params
Thank you!
Morkov
Reply
#3
What is the use case for this?
Reply
#4
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.
Thank you!
Morkov
Reply


Forum Jump: