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.

strange scheduler problem, scripting
#1
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:
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?
Reply


Messages In This Thread
strange scheduler problem, scripting - by gjniewenhuijse - 26.01.2017, 12:17

Forum Jump: