https://prefect.io logo
Title
m

Matt Harvey

09/13/2019, 6:34 PM
Hello! Quick question. The Schedules doc say:
Prefect does not support sub-minute schedules.
Is this a hard limit? I have the need to run a Prefect Flow secondly for a minute (and then stop). 🙏
c

Chris White

09/13/2019, 6:46 PM
Hi Matt! This is currently a hard limit; assuming your Flow isn’t very complicated, you might be able to achieve your same goal with Task Looping: https://docs.prefect.io/core/tutorials/task-looping.html
m

Matt Harvey

09/13/2019, 6:52 PM
Okay, Chris, that will work. Thank you so much. Love what you all are doing with Prefect.
:marvin: 3
c

Chris White

09/13/2019, 6:53 PM
Anytime - thanks Matt!
j

Jeremiah

09/13/2019, 7:36 PM
@Matt Harvey we enforce that limit because it’s a reasonable limit when people move into distributed environments where there can be non-trivial spinup times, so higher frequencies can cause backups. You could in theory go remove it in your own code with a custom scheduler and I think it would work as expected… though we wouldn’t officially support it 😉
m

Matt Harvey

09/13/2019, 8:38 PM
@Jeremiah I appreciate the additional context. That makes sense. I think for my use case, what I'll end up doing is triggering by minute, and then in the first task (which is what really requires the secondly operation), implement a Task Loop that can exit out of there once it has what it needs, and then since that Task will be complete, the rest of the flow will run.
j

Jeremiah

09/13/2019, 9:29 PM
Sounds good and give us a shout to let us know how it goes! We want to explore higher frequencies, just in a conservative way for users!