Issue with Seconds in Scheduling Triggers (Self-Hosted v1.51.2)

Hi Everyone,

I’ve encountered an issue with the scheduling trigger. When I set it to run every 30 seconds, it works fine. However, if I set it to anything above 60 seconds, it still triggers every minute. For instance, setting it to 120 seconds will still cause it to trigger every 60 seconds, always at the 00 second mark (e.g., 15:21:00, 15:22:00).

This issue occurs only on the self-hosted version 1.51.2. The cloud version 1.50.1 does not have this problem.

P.S. I just downgraded to version 1.50.1, and the issue is not occurring. It seems like a bug in version 1.51.2.

Thanks.

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:

Hi @John_Wick

Welcome to the community! :space_invader:

This is interesting. There were no inherent changes made to the schedule trigger node between these versions. I’m now updating one of my instances to test this out.
Meantime, could you share how you’re hosting your instance? Just to help reduce the number of variables :slight_smile:

And also, does this happen only on actie executions or test ones as well?

I am hosting it using this guide: Hetzner | n8n Docs

And I am not sure what is an active execution or test :face_with_hand_over_mouth:

I think this broke in refactor(core): Centralize CronJob management by netroy · Pull Request #10033 · n8n-io/n8n · GitHub since that code assumed that no one would use a duration in seconds with value over 60 :person_facepalming:

Thanks for reporting this. We’ll get it fixed tomorrow.

2 Likes

So, we updated our setup to use Cron consistently everywhere. Which is an issue now because Cron format does not support “every X seconds/minutes” for a value of X above 59.
We need to either

  • figure out a way to normalize the cron expression, and possibly register a group of crons to make it act like a duration > 59
  • revert the code for seconds duration to use a timer instead of a cron expression, or
  • start enforcing a max value of seconds/minutes duration to 59 in the UI as well.

The last one sounds semantically correct, but it’ll also be a breaking change.

It’s possible that we won’t get this fixed tomorrow, but I’ll bring this up with the team to see if we can find a quick solution for this.

until then, maybe you could try changing the duration to 59 seconds or 2 minutes :pray:

Ahh its ok until then I can use Version 1.50.1, the same version you have in the cloud.

@netroy @mariana-na Can you let me know here when the fix is in place so I can try it out?

Thanks

Hey @netroy @mariana-na any updates on this, is there a tracker which I could follow?

Kind Regards

Hey @John_Wick,

No updates yet, Typically once fixed we post an update on the thread to make you aware. In this case have you not been able to work around it by setting it to run every 2 minutes instead which would do the same thing?

Thanks for the reply @Jon, no in my case the timer is fine grained to seconds and is self adapting after every run.

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