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
#2
Is it a scheduled script or a script triggered by a scheduler event? Are you sure this is the correct script since 172800 is a number of seconds in two days, not one.
Reply
#3
(26.01.2017, 12:49)admin Wrote: Is it a scheduled script or a script triggered by a scheduler event? Are you sure this is the correct script since 172800 is a number of seconds in two days, not one.

Its a scheluded script and that doesn't work. If i execute the code in a normal script it works.

Sorry, yes i changed the interval in the script from 24 to 48 to test something, but i pasted the wrong result Sad

This problem starts this weekend, same time with other problems: redis server down? zwave app crash etc (i contacted support about this problem).
Reply
#4
Have you tried rebooting the device? Can you make sure that date/time/timezone settings are correct?
Reply
#5
date/time/timezone is correct.

it looks like a reboot solved it.

But i use a reboot only if its really needed, because the zwaveapp is not so happy with reboots.
Reply
#6
problem is back, scheduled at 12:00 but executed at 13:00 and a log message.
Reply
#7
Can you send remote access details via e-mail or PM?
Reply
#8
(27.01.2017, 12:10)admin Wrote: Can you send remote access details via e-mail or PM?

done to support
Reply
#9
I think the problem is related to a backup of my system that is running on another LM, but where?
Reply


Forum Jump: