It is my understanding that Node-Red will eventually have persistent variables - but while we're waiting - this is how I do it. Using the global.get and global.set mechanisms, I store a single object.
So - when Node-Red pops up it looks to the SD for that object - if not there it creates and initialises it. If there, it reads it into the struct. There is a countdown timer in the object and the function controlling all of this is called every 5 seconds. If the counter is zero, nothing happens. If the counter is true, it is decremented. If it gets to zero, the object is saved to disk over-writing the original. It is that simple and it has worked for me for a long time now.
So imagine a Node-Red user function - with a 5 second timer feeding it (the INJECT NODE) - the payload of the latter is irrelevant.
Here's the function - the object and it's internal bits are mine - you'd alter them for whatever you need.