Hey,
Wondering if anyone has a solution to this.
So I have an event that when fires uses a timeout node to countdown for 2 hours before I need to turn off the device. It works fine, but the problem with any timeout that is longer than a few minutes is, that if I deploy in the meantime, or restart the server etc, the timeout is lost.
So what I need is a persistent timeout (like using a data store in the change mode), or a way to dynamically create an inject node or something that fires at a certain time (and then gets deleted).
What's the best way to handle this?
I'm thinking that I could set the finish time (now + 2 hours) to a persistant data store, through change, and set up an inject that fires after deploy / start that reads that, sees if a timer was active, and if so resets the timer with (end time - now). Should work, but wondering if there's a better solution I'm missing.
Thanks