ym1198
ym11982y ago

Create a job to run after ten minutes of creation

Now i created a flow and when I trigger it via webhook, it immediately gets added in queue and runs when it is at head of queue. I want to do something like trigger flow webhook so that job is created but it should start running after 10 minutes or similar something Reason - I want to trigger an event but data would be updated within 10 mins which this job will utilise
20 Replies
ym1198
ym1198OP2y ago
@rubenf please help if there is a way for this
Sindre
Sindre2y ago
https://www.windmill.dev/docs/flows/sleep Create a dummy step that waits 10 min as the first step.
ym1198
ym1198OP2y ago
Nice, windmill is cool ! is applicable to variety of usecases
rubenf
rubenf2y ago
the one software TO RULE THEM ALL and in open-source BIND THEM
ym1198
ym1198OP2y ago
this was auto-created , no issues right ? also a silly question but just for confirming, sleep does not fill queue till it completes, right ? I mean other jobs can continue to run while a flow job is sleeping
Sindre
Sindre2y ago
sleep does not fill queue till it completes
Correct
I mean other jobs can continue to run while a flow job is sleeping
Yes
this was auto-created , no issues right ?
Not sure what you ref to here. I do not understand the question
ym1198
ym1198OP2y ago
Not sure what you ref to here. I do not understand the question
i created an empty step, gave it sleep of 10 mins, when i save and deploy the flow, above step (image) get added automatically after sleep step
Sindre
Sindre2y ago
No step should be added automatically. I think you may have missed clicked. Just Remove it.
ym1198
ym1198OP2y ago
I removed it , then again when i saved and deploy, it got added again i will try to send a video
rubenf
rubenf2y ago
Some steps get added automatically, for instance when sleep is the last step Because you cannot transition sleep to no step
ym1198
ym1198OP2y ago
yes sleep was last step, makes sense now
Sindre
Sindre2y ago
but then your are not waiting 10 min before you execute your job? you are only waiting 10 min before you return the result of your job. Is that what you want?
ym1198
ym1198OP2y ago
no actually i will add another step after sleep which will do the after-10-min logic but meanwhile i was just testing sleep, so got this extra step added, so had a doubt Now when i will add after-10-min step, i am hoping the auto-added step will not be added anymore I had created a flow for this in this way : step1 - do nothing , sleep after completion for 1 hour step2 - does a logic error handler script step2 has now encountered an error runtime , so now error handler script is scheduled for 1 hour later (1 hour after error happened) i am not understanding if step 2 script gave error, why error handler is scheduled for later ? @rubenf pls help if possible
rubenf
rubenf2y ago
It shouldn't, can you share your flow.json please
ym1198
ym1198OP2y ago
here is image of it
ym1198
ym1198OP2y ago
how to obtain flow.json ?
rubenf
rubenf2y ago
it's in the top bar JSON or in the vertical "..." menu
ym1198
ym1198OP2y ago
here it is
rubenf
rubenf2y ago
Thanks, I will take a look asap, likely next week
ym1198
ym1198OP2y ago
updated one

Did you find this page helpful?