Workflow Steps Don't Run When resumeAt Is Reached

I have a workflow with a sleep step that was due to run until 2025-11-28T15:00:00.000Z but when that time was reached, the next step in the workflow didn’t run.

Tried reporting this as a bug but apparently Vercel’s support isn’t interested. They directed me here but not sure how anyone will be able to help :person_shrugging:

It’s configured like this -

  const appointmentTime = new Date(bookingStartTime);
  const twentyFourHoursBefore = new Date(
    appointmentTime.getTime() - 24 * 60 * 60 * 1000
  );

  // Sleep until 24 hours before the appointment - this sleep step is shown in the dashboard
  await sleep(twentyFourHoursBefore);

  // Check if the booking is still active - this wasn't logged
  console.log(`[Workflow] Checking booking status for ${bookingUid}`);
  const bookingStatus = await checkBookingStatus(bookingUid, bookingStartTime);

  ...

So the resumeAt is:

{
  "resumeAt": "2025-11-28T10:00:00.000Z"
}

Documentation - sleep

1 Like

Hi, thanks for reporting! This is unfortunately a serious bug on our end

We have pushed a fix to the latest workflow package you can update to and then this should be fixed for all new workflows started. Unfortunately existing ones will not resume automatically

The bug was with certain sleep times that line up with internal queue expiration times. Basically we have internal queues, and when the queue approaches its expiration time while a workflow is sleeping, it reschedule it onto a different queue. There was a window where the queue could expire without rescheduling and therefore the workflow never wakes up

We’re running internal tests on this now (which take a couple days to ensure it works for long sleeps) before announcing the issue outwardly but I wanted to get back to you quickly

1 Like

Ah I see, thanks for the detailed response! I’ll update.