# How to run a flow only once a day?

**URL:** <https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915>\
**Category:** Questions & Help\
**Tags:** app, tools, flow\
**Created:** [January 24, 2020, 8:21am UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915 "2020-01-24T08:21:12Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![meistereder](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/meistereder/32/5953_2.png) [@meistereder](https://community.homey.app/u/meistereder)\
**Post date:** [January 24, 2020, 8:21am UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/1 "2020-01-24T08:21:13Z")

</div>

Hi,

I would like to have my vacuum cleaners only run once a day when nobody is at home.

Is there an easy way to ensure that a flow is only executed once a day and then go to pause mode until a new day starts?  
I can of course ensure this behavior with multiple flows and pause/unpause flows with it but I’m searching for an easy method with not so much helper flows needed. 😉

---

<div class="post-metadata">

**Author:** ![DidierVU](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/didiervu/32/12458_2.png) [@DidierVU](https://community.homey.app/u/DidierVU)\
**Post date:** [January 24, 2020, 8:30am UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/2 "2020-01-24T08:30:29Z")

</div>

I would think of making a conditional logic which resets everyday to 0 and when the vacuum cleaner starts updates to 1. Then check IF conditional logic = 0 THEN start vacuum cleaner ELSE do nothing

---

<div class="post-metadata">

**Author:** ![Igy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/igy/32/22144_2.png) [@Igy](https://community.homey.app/u/Igy)\
**Post date:** [January 24, 2020, 8:59am UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/3 "2020-01-24T08:59:19Z")

</div>

You can use timer functionality (Countdown) that will last 24 hours and will start as soon as flow will start. Until it will run, flow will not start again (use it in then condition).

---

<div class="post-metadata">

**Author:** ![meistereder](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/meistereder/32/5953_2.png) [@meistereder](https://community.homey.app/u/meistereder)\
**Post date:** [January 24, 2020, 9:27am UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/4 "2020-01-24T09:27:53Z")

</div>

Yes, this would work. I thought about this already, but also thought that maybe there is a helper app or something which does exactly this. I have some more such scenarios (like only report once a day when the battery is low or similar stuff) and I think that more people hat the requirements like I have. 😉

---

<div class="post-metadata">

**Author:** ![cjvs](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cjvs/32/8115_2.png) [@cjvs](https://community.homey.app/u/cjvs)\
**Post date:** [January 24, 2020, 9:31am UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/5 "2020-01-24T09:31:40Z")

</div>

- Within your vacuum cleaner flow (flow 1), end the flow by disabling itself.
- The second flow is run daily on a specific time, which enables flow 1 again.

---

<div class="post-metadata">

**Author:** ![meistereder](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/meistereder/32/5953_2.png) [@meistereder](https://community.homey.app/u/meistereder)\
**Post date:** [January 24, 2020, 9:32am UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/6 "2020-01-24T09:32:34Z")

</div>

> [@Igy](#):
>
> You can use timer functionality (Countdown) that will last 24 hours and will start as soon as flow will start. Until it will run, flow will not start again (use it in then condition).

Hm, let’s say on Monday I leave the house at 8 o’clock and the vacuums are started. The next day I leave at 7 o’clock, but the cleaning would not be started cause the countdown time is still greater than 0. What could work is, I set the countdown timer to `24h - $current_time` =\> `24h - 8 o'clock = 16h`. This would ensure that the earliest time the flow could run again would be at midnight.  
This sounds okay - I will try that!

---

<div class="post-metadata">

**Author:** ![Hannes85](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@Hannes85](https://community.homey.app/u/Hannes85)\
**Post date:** [January 24, 2020, 9:32am UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/7 "2020-01-24T09:32:49Z")

</div>

Flow 1;

When;  
last person left home

then;

start cleanup  
Disable flow (after 5 seconds)

Flow 2;  
Every night at 2 AM enable flow

---

<div class="post-metadata">

**Author:** ![meistereder](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/meistereder/32/5953_2.png) [@meistereder](https://community.homey.app/u/meistereder)\
**Post date:** [January 24, 2020, 9:33am UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/8 "2020-01-24T09:33:50Z")

</div>

see my answer here: I really would like to only have one flow per scenario: [How to run a flow only once a day?](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/6)

---

<div class="post-metadata">

**Author:** ![Hannes85](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@Hannes85](https://community.homey.app/u/Hannes85)\
**Post date:** [January 24, 2020, 9:34am UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/9 "2020-01-24T09:34:34Z")

</div>

You’re making your life harder than needed 🙂

——  
When;

Last person left

And;  
Logic “vacuum countdown” IS LESS THEN 100

Then;  
Start vacuum  
Start countdown timer “vacuum countdown“ to 36000

——  
Just noticed this was already mentioned, nvm 🙂

---

<div class="post-metadata">

**Author:** ![Koktail](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/koktail/32/51498_2.png) [@Koktail](https://community.homey.app/u/Koktail)\
**Post date:** [January 24, 2020, 7:12pm UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/11 "2020-01-24T19:12:16Z")

</div>

I’ve made a feature request once for a condition card:  
“When this flow had not run today”  
But never heard again.

I’ve use a variabele and better logic for that.

---

<div class="post-metadata">

**Author:** ![Igy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/igy/32/22144_2.png) [@Igy](https://community.homey.app/u/Igy)\
**Post date:** [January 25, 2020, 1:16pm UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/12 "2020-01-25T13:16:37Z")

</div>

> [@RoyWissenburg](#):
>
> Ofcourse it wouldnt be a problem to have 1 timer running, but if you would have several timers running at the same time… homey performens could be getting worse as normal

Come on, its just a timer, not a moon landing calculation 😉

---

<div class="post-metadata">

**Author:** ![ewok](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ewok/32/4138_2.png) [@ewok](https://community.homey.app/u/ewok)\
**Post date:** [January 25, 2020, 3:41pm UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/14 "2020-01-25T15:41:32Z")

</div>

I had a similar question where I wanted a text and voice reminder to get the trash outside. Made a movement alarm that checks a logic where the day is not the current day. It will flip the logic card at the end of the flow.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/e/2e6e8d5af84882bbc18edefd99883af741b10e4d.jpeg)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/9/29112954184b5c60bd628e56f7e8ea7cbff01eb9.jpeg)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/1/216e5524fde7101e2fb8c056c259e588143fd46f.jpeg)

---

<div class="post-metadata">

**Author:** ![meistereder](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/meistereder/32/5953_2.png) [@meistereder](https://community.homey.app/u/meistereder)\
**Post date:** [January 25, 2020, 8:32pm UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/15 "2020-01-25T20:32:10Z")

</div>

That is a nice trick! Will definitely try this out

---

<div class="post-metadata">

**Author:** ![PetervdK](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/petervdk/32/20669_2.png) [@PetervdK](https://community.homey.app/u/PetervdK)\
**Post date:** [January 25, 2020, 11:15pm UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/16 "2020-01-25T23:15:48Z")

</div>

Nope, but Homey has to keep counting for 24 hours. Thus use processor capacity and memory to keep track. If you make several flows with such a long timer… Fill in the blanks. But don’t expect to get them filled in very fast…

---

<div class="post-metadata">

**Author:** ![meistereder](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/meistereder/32/5953_2.png) [@meistereder](https://community.homey.app/u/meistereder)\
**Post date:** [January 26, 2020, 12:48pm UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/17 "2020-01-26T12:48:44Z")

</div>

Then the Countdown is buggy. Countdown timers should not use much cpu power, and even less memory. Though I found the way to use the current date much more elegant.

---

<div class="post-metadata">

**Author:** ![TheBigFella](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/thebigfella/32/79083_2.png) [@TheBigFella](https://community.homey.app/u/TheBigFella)\
**Post date:** [August 11, 2024, 8:29am UTC](https://community.homey.app/t/how-to-run-a-flow-only-once-a-day/24915/18 "2024-08-11T08:29:54Z")

</div>

I have the same question, but in my case I only want to open the curtains once a day. If I decide to close them after opening them with a flow, I kind of want the flow to stop until it is the next day. Does anyone have a suggestion on how to do this? I don’t see the countdown option anymore.
