Schedule Trigger node not running accurately

I set a schedule trigger to run evvery 7 hours but it ends up running before the 7 hour mark and it never runs again

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 2.4.6
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Linux

Hi @Anjola

This is expected behavior. The Schedule Trigger does not run “X hours after the previous execution”. It aligns executions to fixed clock intervals, and container restarts can cause the first run to happen earlier than expected.

In Docker setups especially, if n8n restarts, the schedule is recalculated, which can make it look like the workflow ran early and then stopped.

Solution:

  • Use Schedule Trigger (e.g. every hour)
  • Store lastRun timestamp
  • Add IF logic:
Date.now() - $json.lastRun >= 7 * 60 * 60 * 1000

This avoids all clock-alignment issues.

Thank you so much Tamy

@Anjola

I’m really happy to hear this helped :blush:
If this solution solved the issue for you, please consider leaving a like or marking the reply as the solution ( it helps others find the answer more easily and also supports community contributors.)

Thanks a lot, and feel free to reach out if you have any follow-up questions!