What would be the simplest method to achieve this? The phone might be rebooted in between so any variables set would be lost.
Should I set a flow, using the time trigger, and a script to test the inverval by dividing the current date in days by x and see if it's a whole number? If, so, what should such an expression in the script look like, please?
(The use case is a cheap phone being used at home for home automation, and that I have to instigate a chargeable event every 90 days to keep its SIM active on the GSM network. The phone in question is normally only used to receive SMSs to trigger actions that take place over WiFi, so no chargeable events occur)
How to send a SMS every x days?
Moderator: Martin
- TheBrain1984
- Posts: 137
- Joined: 07 Aug 2013 08:17
- Location: Germany
Re: How to send a SMS every x days?
Hi,
First of all after a reboot of the phone not every var is lost. The global_vars (vars that begin with global_ you can check them under the menu --> manage --> global vars) keep their value.
I would do it like this:
I would make a flow that starts like every 5 hours. The first thing the flow does to check if the triggertime is bigger than global_totrigger (if global_totrigger is present), if yes send the message and set global_totrigger via script like global_totrigger = addDays(x, triggertime) //x is the value of days you want to add
and if not not it should do nothing.
First of all after a reboot of the phone not every var is lost. The global_vars (vars that begin with global_ you can check them under the menu --> manage --> global vars) keep their value.
I would do it like this:
I would make a flow that starts like every 5 hours. The first thing the flow does to check if the triggertime is bigger than global_totrigger (if global_totrigger is present), if yes send the message and set global_totrigger via script like global_totrigger = addDays(x, triggertime) //x is the value of days you want to add
and if not not it should do nothing.
Re: How to send a SMS every x days?
Thanks for the clarifaction and steer. Will give it a go 

Re: How to send a SMS every x days?
Got it to work once I realised the syntax is addDays(triggertime, x) rather than addDays(x, triggertime). 

- TheBrain1984
- Posts: 137
- Joined: 07 Aug 2013 08:17
- Location: Germany
Re: How to send a SMS every x days?
Sorry, my fault. 
