Global vars for OH3 Rules?

what language are you using? for ECMA, to keep variables alive between runs, assign them to this. :slight_smile:

this.myTimer = (this.mytimer === undefined) ? null:this.myTimer;

this.myTimer = ScriptExecution.createTimer(ZonedDateTime.now().plusMinutes(1), function(){
                  // do something
                  this.myTimer = null;
                });