Workflow schedule set to run interval of 42 min starts too early

Describe the problem/error/question

Ive set my workflow to exececute every 42 minutes and instead it executes 2 times in 1 hour
image
image
(i cancelled last run because previous. was still running)

is it only me that this happens or its some kind of known bug?

Information on your n8n setup

  • n8n version: cloud latest
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

@Andrzej , do you mean to run the workflow every hour at the 42nd minute? In that case the schedule should be configured as below

image

@ihortom i actually wanted it to run every 42 minutes but it then had run eg. at 21:00 and then again at 21:42 and then again at 22:00 which was not 42 min between every run

I’m afraid it is not possible. To run a job every N minutes, N has to go into 60 minutes’ interval even number of times. For example, you can set every 2, 3, 4, 5, 6, 10, 12, 15, 20 or 30 minutes but not 42.

In other words, the following condition has to be true, 60 % N == 0.

As as compromise, to run the workflow every 40 minutes (quite close to every 42 minutes), you could use the following three conditions alongside:

  1. Run at 40th minute of each 3rd hour starting from midnight
  2. Run at 20th minute of every 3rd hour starting from 1 AM
  3. Run at 0 minute of every 3rd hour starting from 2 AM

I think this could be achieved with the following three custom cron expressions:

0 40 */3 * * *
0 20 1/3 * * *
0 0 2/3 * * *
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.