seaside1 / jrule

openHAB Java Rules Engine
Eclipse Public License 2.0
29 stars 15 forks source link

add reschedule #155

Closed querdenker2k closed 1 year ago

querdenker2k commented 1 year ago

change timer runnable to consumer(JRuleTimer) to reschedule timers, like this

    createTimer(ZonedDateTime.now().plusSeconds(5), t -> {
            if (something) {
                t.reschedule(ZonedDateTime.now().plusSeconds(5));
            }
    }
querdenker2k commented 1 year ago

i am not really sure if this is the best approach, but i didn't see another one.