I have an agent function called checkTime that’s called recursively every 30 seconds using the statement:
local ref=imp.wakeup(30, checkTime); inside the function. I check ref and log an error if null.
While it works fine for what seems like a few weeks (or maybe months) the function eventually stops being triggered. No error is logged but when I finally notice it’s broken and restart the code it carries on working for another few weeks. Having such a long time between failures makes it awkward to test which is why I’m a bit vague on the details. I’ve only just had this happen again for the third time.
Might there be some limit on recursion that I’m running into? I’m sure I’ve got device code running recursively like this without any problems.