Ignore trigger unless completed

Hi - We have a workflow that is scheduled to run every 15 min. But in some rare cases, the workflow is still running (looping through data) when the next cron trigger starts. This causes significant errors.

Is there a way to prevent the workflow cron trigger from running again if it’s already running?

When self-hosting n8n, you could use this example provided by Jan to see if a workflow is already running:

To test this on your end, you would need to save your workflow before running it (otherwise no workflow ID would be assigned).

Thank you! That worked!

1 Like