Page 1 of 1

Alarm clock and variable

Posted: 08 Sep 2014 09:18
by thephiloospher
Hi Martin,
there is a method to incorporate the time and date of the future alarm clock in a variable?

thanks.

Re: Alarm clock and variable

Posted: 08 Sep 2014 17:52
by Martin
Hi,

I'm not sure if I understand your question properly. Do you want to set an alarm in the alarm app for an arbitrary date in the future?

You can use variables to set the hour and the minute when you have a regular date/time in a variable. The variable could be initialized in an action Script, for example alarmtime=getDate().
You can set the field Hour (0-23) to {alarmtime,dateformat,HH} and the field Minutes (0-59) to {alarmtime,dateformat,mm}.
This will set the alarm for the next occurrence of the alarm time but not an arbitrary amount of days in the future. For this you could build a flow with a trigger Global Variable Date/Time that set's the alarm on the date of the alarm.

As a more general solution, you could add alarmtime to a global list, for example called global_scheduled_alarms. A flow that is executed each day at midnight checks if the global list contains an alarm for this day and executes the proper action Set Alarm. It requires a bit of scripting to achieve this but this method would also allow to schedule multiple future alarms.

Please note that the alarm clock apps are sometimes limited to a maximum number of 10 alarms and don't provide a mechanism to delete alarms, so you will have to manually remove passed alarms from time to time.

Regards,
Martin

Re: Alarm clock and variable

Posted: 15 Sep 2014 07:29
by thephiloospher
Ok, thanks.