Do Every X seconds vs Schedule a Workflow (Which one consumes more WUs)

Hello everyone,

I’m working on a frontend workflow in my application that involves making two separate API calls. The requirement is for the second API call to be executed 30 seconds after the first one. I understand that one approach to achieve this delay is by scheduling an API workflow on the backend. Alternatively, I’m considering a method on the frontend where I create a custom state initialized at 0, use a “Do Every X Seconds” action set to 30 seconds, and then trigger the second API call once the custom state indicates that 30 seconds have elapsed.

My question is: Between these two approaches, which one would consume more Workflow Units (WUs)? Any insights or advice would be greatly appreciated. Thank you in advance!

It will be slightly more WU, but if you want it to guaranteed run even if the user closes out of the browser, do the scheduled backend workflow.

If it’s okay that they stay on page you can do “Schedule a custom event” action with a 30 second delay.

1 Like