29.02.2024, 19:26
I have a scheduled script which changes the value of a group address to 0 and then I have a second scheduled script which puts the value back to 1. The first script has ID=112 and the second 113.
Now, I want to change the time that both scripts are performed, using a script. I want that the first script is performed at 23 o'clock and the second script at 24h. I changed the code to:
But, nothing is changing. What am I doing wrong?
Now, I want to change the time that both scripts are performed, using a script. I want that the first script is performed at 23 o'clock and the second script at 24h. I changed the code to:
Code:
id = 112 -- scheduled script id
value = event.getvalue()
params = string.format('00 23 * * *', value.minute, value.hour)
db:update('scripting', { params = params }, { id = id })
script.reloadsingle({ type = 'scheduled' })
--
id = 113 -- scheduled script id
value = event.getvalue()
params = string.format('00 24 * * *', value.minute, value.hour)
db:update('scripting', { params = params }, { id = id })
script.reloadsingle({ type = 'scheduled' })
But, nothing is changing. What am I doing wrong?