# \[Timeline\] Flow disabled because it runs 60 times

**URL:** <https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [July 19, 2022, 3:19pm UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238 "2022-07-19T15:19:19Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 15, 2022, 9:30pm UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/22 "2022-09-15T21:30:18Z")

</div>

Just after a soft reboot:

 ![Screenshot_20220915-192704_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/7/f746def92f41bc2ecf954ee0dd80ae152d9e51b3.jpeg)

These are flows with “Every x `time unit`” triggercards

Shortest time intervals:

- flow AF Homey … : every 31s
- flow Time\_ … : every 10s
- flow Show …: every 60minutes  
But it has a loop every 28 seconds

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [September 16, 2022, 5:24am UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/23 "2022-09-16T05:24:10Z")

</div>

Another day, another rate limiter bug 😜

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 16, 2022, 1:39pm UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/24 "2022-09-16T13:39:41Z")

</div>

Well, keeps us busy 🤣 , and it’s better than SSDD 😅

---

<div class="post-metadata">

**Author:** ![Jero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jero/32/17556_2.png) [@Jero](https://community.homey.app/u/Jero)\
**Post date:** [September 17, 2022, 8:26am UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/25 "2022-09-17T08:26:14Z")

</div>

It means the code thats runs the Flow did not exit properly. The code looks something like this:

```auto
count++;

try {
  const result = await this.run(args);
  return result;
} catch (error) {
  throw error;
} finally {
 // This block always executes.
  count--;
}

```

This can be triggered easily if you have a Flow that triggers every second that starts a delay for 120 seconds for example. On the 61th time the previous executions are not done yet so to prevent this ‘leak’ going on forever we disable the Flow.

I have a feeling the system might be triggering your time cards alot of times on reboot so maybe you can try to log if that is happening?

It can also be a bug in this count code but I would expect alot more reports if that were true.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 17, 2022, 4:51pm UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/26 "2022-09-17T16:51:20Z")

</div>

Hi Jeroen,

Thanks for looking in to this.  
I could reproduce it with two flows today. I created a counter and a log for the shortest Every X s triggers in both flows and restarted Homey.

 ![Screenshot_20220917-151033_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/d/edf53bbe965b4f05fb7aa865bc92e86f3afaf63e.jpeg)

_Do you have an idea why it does not occur anymore when I just enable the flows again? It happens only after restarts._

1. Part of flow _AF Homey insights monitor_  
(I can’t imagine this takes longer than 31s to finish. How would I log that?)  
 ![Screenshot from 2022-09-17 16-17-32](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/1/81b9e1fceaa98b6d734a7d2146702d3d80108c78.png)

- 1a) Logged with Papertrails:  
(_Just one entry and 1 counted, which is weird (flow supposed to be disabled at `14:54`_)  
`2022-09-17 14:47.04.373 31s trg count#: 1[flow AF Homey insights monitor]`

1. Part of flow _AF Time\_Date\_stuff_  
 ![Screenshot from 2022-09-17 16-19-21](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/3/33b6d17a07416c617528b489feb804054a1cae52.png)

- 2a) Logged with Papertrails:  
(_This also stops at `14:47` and did not reach 60 times_)

```auto
2022-09-17 14:41.50.257 10s trg count#: 1 [flow AF Time_Date_stuff]
2022-09-17 14:42.01.222 10s trg count#: 2 [flow AF Time_Date_stuff]
2022-09-17 14:42.10.283 10s trg count#: 3 [flow AF Time_Date_stuff]
2022-09-17 14:42.20.266 10s trg count#: 4 [flow AF Time_Date_stuff]
2022-09-17 14:42.30.339 10s trg count#: 5 [flow AF Time_Date_stuff]
2022-09-17 14:42.40.258 10s trg count#: 6 [flow AF Time_Date_stuff]
2022-09-17 14:42.50.287 10s trg count#: 7 [flow AF Time_Date_stuff]
2022-09-17 14:43.00.412 10s trg count#: 8 [flow AF Time_Date_stuff]
2022-09-17 14:43.10.397 10s trg count#: 9 [flow AF Time_Date_stuff]
2022-09-17 14:43.20.262 10s trg count#: 10 [flow AF Time_Date_stuff]
2022-09-17 14:43.30.302 10s trg count#: 11 [flow AF Time_Date_stuff]
2022-09-17 14:43.40.456 10s trg count#: 12 [flow AF Time_Date_stuff]
2022-09-17 14:43.50.484 10s trg count#: 13 [flow AF Time_Date_stuff]
2022-09-17 14:44.00.569 10s trg count#: 14 [flow AF Time_Date_stuff]
2022-09-17 14:44.10.368 10s trg count#: 15 [flow AF Time_Date_stuff]
2022-09-17 14:44.20.560 10s trg count#: 16 [flow AF Time_Date_stuff]
2022-09-17 14:44.30.498 10s trg count#: 17 [flow AF Time_Date_stuff]
2022-09-17 14:44.40.439 10s trg count#: 18 [flow AF Time_Date_stuff]
2022-09-17 14:44.50.499 10s trg count#: 19 [flow AF Time_Date_stuff]
2022-09-17 14:45.00.882 10s trg count#: 20 [flow AF Time_Date_stuff]
2022-09-17 14:45.10.396 10s trg count#: 21 [flow AF Time_Date_stuff]
2022-09-17 14:45.20.467 10s trg count#: 22 [flow AF Time_Date_stuff]
2022-09-17 14:45.30.373 10s trg count#: 23 [flow AF Time_Date_stuff]
2022-09-17 14:45.40.542 10s trg count#: 24 [flow AF Time_Date_stuff]
2022-09-17 14:45.50.526 10s trg count#: 25 [flow AF Time_Date_stuff]
2022-09-17 14:46.00.619 10s trg count#: 26 [flow AF Time_Date_stuff]
2022-09-17 14:46.10.441 10s trg count#: 27 [flow AF Time_Date_stuff]
2022-09-17 14:46.20.633 10s trg count#: 28 [flow AF Time_Date_stuff]
2022-09-17 14:46.30.503 10s trg count#: 29 [flow AF Time_Date_stuff]
2022-09-17 14:46.40.468 10s trg count#: 30 [flow AF Time_Date_stuff]
2022-09-17 14:46.50.549 10s trg count#: 31 [flow AF Time_Date_stuff]
2022-09-17 14:47.00.673 10s trg count#: 32 [flow AF Time_Date_stuff]
2022-09-17 14:47.10.437 10s trg count#: 33 [flow AF Time_Date_stuff]
2022-09-17 14:47.20.516 10s trg count#: 34 [flow AF Time_Date_stuff]

```

- 
  - When I look at the device tile, it seems to be updated within the triggertime of 10s;  
Device screenvid:  
 ![Peek 2022-09-17 17-27](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/d/ada2ad6017d309166cde2f014a5a79b67e549f7e.gif)

.  
**Second Test**  
Just now I tested with the counter and log directly connected to the “suspect” triggercards;  
As I expected a bit, **there were no issues now, after restarting Homey**

So, I changed some time triggers and increased the time with a few secs, and I’vd changed the delays with a few secs as well.

After a reboot, all’s OK. 🙃  
But, it still puzzles me why 31s is too short for the flow 1. part to finish

I’m thinking to create separate AF flows for \<60s time triggers.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 18, 2022, 4:53pm UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/27 "2022-09-18T16:53:34Z")

</div>

mmzzz Today it popped up again, the three flows wer disabled again. It was after a power failure this morning.

If i’m the only one with this problem, I’ll workaround it like this:

 ![Screenshot from 2022-09-18 18-50-58](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/b/1bb1e283b1d0fea59b2b33573c4a8201274dc06e.png)

![Screenshot from 2022-09-18 18-52-30](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/2/b2895eb3ce0e372ed5d4275740dae206f62489ad.png)

---

<div class="post-metadata">

**Author:** ![Jero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jero/32/17556_2.png) [@Jero](https://community.homey.app/u/Jero)\
**Post date:** [September 18, 2022, 6:21pm UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/28 "2022-09-18T18:21:16Z")

</div>

What do you mean by power failure?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 18, 2022, 6:22pm UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/29 "2022-09-18T18:22:29Z")

</div>

The mains power in the house was cut off for a while  
The odd thing is, once the flows are enabled again, after the 60 times error, it runs fine

```auto
2022-09-18 15:07.39.901 31s trg count#: 890[flow AF Homey insights monitor]
2022-09-18 15:07.48.103 10s trg count#: 3986 [flow AF Time_Date_stuff]
2022-09-18 15:08.00.452 10s trg count#: 3987 [flow AF Time_Date_stuff]
2022-09-18 15:08.12.055 10s trg count#: 3988 [flow AF Time_Date_stuff]
2022-09-18 15:08.24.341 10s trg count#: 3989 [flow AF Time_Date_stuff]
2022-09-18 15:08.36.055 10s trg count#: 3990 [flow AF Time_Date_stuff]
2022-09-18 15:08.37.335 31s trg count#: 891[flow AF Homey insights monitor]
2022-09-18 15:08.48.059 10s trg count#: 3991 [flow AF Time_Date_stuff]
2022-09-18 15:09.00.251 10s trg count#: 3992 [flow AF Time_Date_stuff]
2022-09-18 15:09.12.047 10s trg count#: 3993 [flow AF Time_Date_stuff]
2022-09-18 15:09.24.081 10s trg count#: 3994 [flow AF Time_Date_stuff]

```

---

<div class="post-metadata">

**Author:** ![Vincent\_Vans](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vincent_vans/32/16788_2.png) [@Vincent\_Vans](https://community.homey.app/u/Vincent_Vans)\
**Post date:** [September 30, 2022, 9:09am UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/30 "2022-09-30T09:09:17Z")

</div>

Hi All. I have the same issue. Reported it to Athom in August. To my suprise, they acknowledged the problem (reports from multiple users), the ticket was closed because they said they could not reproduce the problem.

I also provided more info (it always occurs directly after a nightly reboot) and a diacnostic report. They did not seen keen to solve this issue.

Their advice was to stop using Advanced flows, and go back to normal flows. Right…

I have been a Homey user from the beginning, but after several issues like this (hence the nightly reboots), my sympathy for this startup has dropped to zero… But now I understand why the Homey core and app are stll full of tiny bugs and development seems to have stopped: users just stop reporting when nothing is done with their feedback. At least I have reached the point that I am not putting any more energy in it.

My compliments go out to all the users on this forum, always willing to help. I will try the workaround mentioned above, thanks Peter\_Kawa.

And thank you all for letting me blowing off steam 🙂

---

<div class="post-metadata">

**Author:** ![Undertaker](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/undertaker/32/53278_2.png) [@Undertaker](https://community.homey.app/u/Undertaker)\
**Post date:** [September 30, 2022, 10:03am UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/31 "2022-09-30T10:03:59Z")

</div>

The next time it happens to me, I’ll send Athom a screenshot. However, it is noticeable that only advanced flows have this error with me. I can confirm that this phenomenon occurs sporadically after a restart.

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [September 30, 2022, 10:49am UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/32 "2022-09-30T10:49:29Z")

</div>

Yeah ,same for me, a few days back when restarting Homey myself normally.  
Also contacted Athom about it (a followup from before) and informed them as best i could.

And indeed, only Advanced Flows with a Start every X Minutes, seems to get disabled on restart.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 30, 2022, 8:40pm UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/33 "2022-09-30T20:40:33Z")

</div>

> [@Vincent\_Vans](#):
>
> hence the nightly reboots

Odd, I pretty much never restart Homey, unless after a power cut, or as a cause of a firmware update.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [October 1, 2022, 8:23am UTC](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238/34 "2022-10-01T08:23:27Z")

</div>

+1

[Previous page](https://community.homey.app/t/timeline-flow-disabled-because-it-runs-60-times/66238.md?page=1)
