Im having trouble figurering this out.
I want to start a timer, when a phone is connected to my wifi.
And when the phone is connected, I want to push a message every 1,5 hour.
I use network bindings to check for the phone, and that works like a charm.
Is it posible to use varibles in a cron? like cron ’ * var+30 var+1 ’ and so on?
You don’t need any cron.
The usual timer techniques used for motion triggered lights etc. will do fine.
When phone connects, start a 1.5 hour timer.
If phone disconnects, cancel timer.
If timer runs to completion, push message and then reschedule itself for another 1.5 hours.
Also think about what you want to happen at system reboot if phone already connected.
For an example of what rossko57 describes see Design Pattern: Looping Timers
Curious, what is the reason you are doing this? I like learning what people are using smarthome for.
Guest phone joins
if mooching > 90 minutes, then
Send message “are you still here? hey mooch get your own wifi”