Triggering a flow at 2 minutes to every hour
Posted: 19 Oct 2016 12:24
I have a flow that I want to trigger at 2 minutes before each hour (i.e. at 00:58, 01:58, 02:58, etc).
I originally tried triggering it daily at 00:58, and then getting it to “sleep” for 60 minutes (or 3600 seconds), but I found that the clock drifted slightly and that it didn’t seem to survive a reboot or a period when the phone was switched off (by which I mean that if the phone was switched off from, say, 01:15 to 01:30, then the flow would not trigger at exactly 01:58:00).
So instead I have set up 24 separate triggers for the flow (at 00:58, 01:58, 02:58…) and this works fine, but seems rather inelegant.
Is there a better/more elegant way to do this, that will survive the phone being switched off for a period or rebooted, and which won’t drift with time?
(For those wondering why I want to do this – my last BMW had an option in the on-board computer to “beep” just before each hour. I found this really useful when I was listening to music, as it would remind me to switch over to the radio, where the News is usually broadcast on the hour. My current cars don’t do this, so I’ve written an AutoMagic flow to check whether I’m in my car, and if so to tell me that “the news will be on in 2 minutes”).
I originally tried triggering it daily at 00:58, and then getting it to “sleep” for 60 minutes (or 3600 seconds), but I found that the clock drifted slightly and that it didn’t seem to survive a reboot or a period when the phone was switched off (by which I mean that if the phone was switched off from, say, 01:15 to 01:30, then the flow would not trigger at exactly 01:58:00).
So instead I have set up 24 separate triggers for the flow (at 00:58, 01:58, 02:58…) and this works fine, but seems rather inelegant.
Is there a better/more elegant way to do this, that will survive the phone being switched off for a period or rebooted, and which won’t drift with time?
(For those wondering why I want to do this – my last BMW had an option in the on-board computer to “beep” just before each hour. I found this really useful when I was listening to music, as it would remind me to switch over to the radio, where the News is usually broadcast on the hour. My current cars don’t do this, so I’ve written an AutoMagic flow to check whether I’m in my car, and if so to tell me that “the news will be on in 2 minutes”).