# How to start a flow at a spesific time stored in variabel, with built in functions (Solution - Check every 60 minutes or use the app "Timey")

**URL:** https://community.homey.app/t/how-to-start-a-flow-at-a-spesific-time-stored-in-variabel-with-built-in-functions-solution-check-every-60-minutes-or-use-the-app-timey/109853
**Category:** Flows
**Tags:** flow
**Created:** [May 14, 2024, 5:18pm UTC](https://community.homey.app/t/how-to-start-a-flow-at-a-spesific-time-stored-in-variabel-with-built-in-functions-solution-check-every-60-minutes-or-use-the-app-timey/109853 "2024-05-14T17:18:27Z")
**Posts on this page:** 1
**Showing post:** 35

<div class="post-metadata">

### Author: ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)
#### Post date: [May 18, 2024, 9:56am UTC](https://community.homey.app/t/how-to-start-a-flow-at-a-spesific-time-stored-in-variabel-with-built-in-functions-solution-check-every-60-minutes-or-use-the-app-timey/109853/35 "2024-05-18T09:56:53Z")

</div>

> [@Rrrr](#):
>
> In any case, I am still trying to get my head around why a 5 minute timestamp needs to match another saved timestamp (who is saving it?). I must be missing something.

Me too. We are getting lost in technical details. And with time, you get timing/concurrency problems, so you have to program failsafe.  
For me, using a variable time to switch on the light, the principle is as follows, something like a task scheduler:

```auto
1. Every day at 13:00 calculate the time to switch on the light, store it in variable SwitchOnTime
2. Every 5 minutes, check if ActualTime > SwitchOnTime
3. If so switch on lamp
4. Disable 5 minute task

```

That seems quite easy😁  
Using this as a starting point, optimizations are possible, and technical choices shall be made during implementation. For example, in a task scheduler you just delete an executed task from the task list. Here you might use a variable to indicate of the task (switching on the light at a variable time) has been executed.

Edit: Cronjob is task scheduler: see [[APP][Pro] CronJob - Trigger Flows with Cron Expressions](https://community.homey.app/t/app-pro-cronjob-trigger-flows-with-cron-expressions/103894)

---

_[View the full topic](https://community.homey.app/t/how-to-start-a-flow-at-a-spesific-time-stored-in-variabel-with-built-in-functions-solution-check-every-60-minutes-or-use-the-app-timey/109853)._
