Timer Logic

Asked Aug 20, 2026·1 reply·Last activity today·Open in Discord ↗
This discussion is live on Discord
Replies posted there show up here automatically.

Sorry, Discord had hidden this forum and I didn't realize, so I had put this in <#229484035745906691>. Any references to "today" would mean 2026-08-17.

I suspect there is something wrong with timer logic in nightbot, but I'm not sure what. I can only describe the symptoms. My account name is "tehgoocherer" on Twitch. I previously had 5 timers with fairly large intervals which I have now disabled. They would constantly trigger in groups and more often than they should based on the interval - even taking into consideration chat lines. I even went so far as to assign them intervals using only prime numbers so that they didn't group up, and they still did all the time. For example I have a timer called "Follow Reminder" that I have set interval to 53 minutes and 2 lines, however I have seen it trigger within 10 minutes of the previous triggering. Chat was not even slow, there were multiple messages for the whole period. Today (2026-08-17) it triggered at 10:53 AM UTC-7 and then triggered again at 11:01 AM UTC-7. All the other timers also grouped up shortly before the second follow reminder timer invocation. I've since disabled all of them but one. Please let me know if you need any further information to investigate this.

tl;dr triggers are firing much more often than they should be and they also tend to group up and "spam" the chat even if I set the intervals to prime numbers to prevent this.

1 reply

timers interally run like cron jobs would.

for example, if you configure every 5 minutes it runs at :00, :05, :10, :15 and so on. as an additional example, if you configure every 15 minutes it runs at :00, :15, :30 and so on.

in addition, if you configure a line count minimum then your chat must have had at least that many messages sent in the 5 minutes prior to the timer execution.

for example, if you configure 5 lines, 5 minutes then at :00 you would need at least 5 messages sent in chat since :55. as an additional example, if you configure 5 lines, 15 minutes then at :15 you would need at least 5 messages sent in chat since :10.