26.01.2017, 12:17
(This post was last modified: 26.01.2017, 12:18 by gjniewenhuijse.)
Since last week, without script changes i have a strange problem. My script doesn't run as expected.
First my script is planned at 12:00 but runs at 13:00, why?
script:
And then it generates a line in the log:
log value: brandmelder check: 2194 >= 172800 true
That's not true, because 2194 < 172800 and value.data == true
What do i wrong?
First my script is planned at 12:00 but runs at 13:00, why?
script:
Code:
cInterval = 24*60*60 --every 24 hours
myobjects = grp.tag('update_chk1')
for index, value in ipairs(myobjects) do
diff = (os.time() - value.updatetime)
if (diff >= cInterval or value.data == false) then
if value.data then
log('brandmelder check: '..diff..' >= '..cInterval..' true')
else
log('brandmelder check: '..diff..' >= '..cInterval..' false')
end
end
end
And then it generates a line in the log:
log value: brandmelder check: 2194 >= 172800 true
That's not true, because 2194 < 172800 and value.data == true
What do i wrong?