Global variables in trigger condition of Rules

Hey Community,

i wonder if its possible to use global variables in the trigger condition of a rule.

val int minutes = 5
rule "update every minutes"
Time cron"0 0/minutes * * * ?"

If it’s possible, how can i do this?

I am afraid but it is not possible.
The cron triggers are fixed in code
However there are others ways to achieve what you want:

Trigger rule every minute
2 global variables - 1 counter and 1 interval
Increase the counter by one in the rule every minute and when you reach the interval execute code and reset the counter

Good luck

Ah okay, thats a nice workaround. Thank you.