Run puppeteer script in random time one per day

Inserting a delay (beyond the time limit in the workflow) no matter what form between trigger and puppeteer causes the problem.
It looks as if the inserted delay cannot exceed the set time limit for the entire workflow (i.e. 3000ms for free tier).

Just to confirm, you’re using $.flow.delay to introduce a random delay to the workflow’s execution correct?

Again, that helper doesn’t affect compute time used. It essentially will pause the execution of the workflow for that amount of time, then resume it again once the time has passed.

The workflow will start where it left off, with a fresh new timeout limit.

But if you’re using a setTimeout or sleep approach, that will count towards your compute time limit.

Again, if you can share code and pinpoint which code is hanging up the workflow we can provide more specific guidance!

I’m an idiot. :wink:

I found where my mistake was.
As I was using “Add step” and “workflow_delay” the delay time was counting into “Workflow Settings/Timeout” and I was exceeding the time limit I set.

Then I changed the approach.
Instead of “workflow_delay” I tried to use

$.flow.delay(delayTime);

but after performing a pause, my code stopped.

After a few days, I only found why.
Wanting to see what the calculated random delay would be I incorrectly inserted a

return console.log(delayTime);
instead of
console.log(delayTime);

After correcting it, everything works OK.
This is one of my first ever codes and I made a childish mistake.
Thanks for your help.