Wait: Execution status = running, not waiting

Hey,

I have this workflow:

  1. Receive stripe trigger
  2. Check if it’s 8am or later
  3. If true, send email
  4. If false, wait an hour, and then loop back and see if it’s 8am or later yet

Goal: Trigger a dunning email to the customer, but as Stripe triggers can come in at midnight, I don’t want to send emails until a sensible hour.

This seems like not necessarily the best way to wait until 8am (I could just do a Wait until Current Time => calculate 8am today) but I thought ^^ would still do the job.

When an execution is triggered, the execution log shows it as continually status = running whilst it’s actually waiting.

I would have expected it to switch the status = waiting, especially as the wait is > 65 seconds so it gets passed off to the database for later execution.

Seeing it as running for minutes, hours, makes me concerned that it’s going to result in a fairly decent server load, and also, just doesn’t seem right. I had two executions of this fail overnight (but can’t see why, hence the concern).

Questions:

  1. Why isn’t it showing as waiting in the execution list?
  2. Is it actually a problem/something to worry about?
  3. Is it worth rebuilding the time check to compare current time with 8am today (rather than a wait +1 hour, try again, loop)?

Running in n8n cloud.

Workflow:
(i’ve removed the nodes that follow TRUE from IF wait until 8am for clarity)

running not waiting

Hey @rjbathgate,

Just curious, Your workflow you have shared has a wait set to wait for 1 minute so while your goal is to wait until 8am you are waiting in 1 minute increments so the workflow wouldn’t be passed to the database to wait as you are expecting as the wait is not actually over 65 seconds.

Below is a screenshot from my instance where I have used your 1 minute wait and a duplicate of it with a 2 minute wait just to check it is working if the wait is long enough.

One thing you could do though to make this easier is rather than a loop like you have why not take the current time and work out how many minutes it would be until 8am and use that as your option in the wait node that way your won’t be looping as much.

Another option which is what I would probably do though is rather than having the wait when the trigger goes off take the data you need to use and add it to something like Baserow / Airtable / Google Sheets if it is before 8am then have one workflow that runs at 8:05 every day (or 8am) that reads that data and sends out the emails then removes the records.

1 Like

OMG

Whoops. Was meant to be 1 hour.

Total slip up on my part :rofl:

Also like the idea of shifting it off to a sheet, thank you :+1:

Rob

1 Like

Hey @rjbathgate,

No problem at all :raised_hands:

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