Hi! I have some flows that run every hour accordi...
# prefect-community
n
Hi! I have some flows that run every hour according to a cron job. My question is whether it is possible to have one of the flows repeat again after 30 minutes (so essentially running that particular flow twice in the hour). I understand that I could use the scheduler in prefect, or just create a separate cron job that runs half-hourly, but I was wondering if there was a third option as well in prefect. Thanks!
j
Hey @Nate Joselson! Are you using Prefect’s schedule object to schedule your flows? They allow for multiple clocks so you could attach two different “schedules” to the flow (one which runs on the hour and one which runs on the half)
Something like:
Copy code
flow.schedule = Schedule(clocks=[CronClock("0 * * * *"), CronClock("30 * * * *)])
n
Thanks for the quick response! I will look into that. I haven’t set up schdule objects on my flows, but it looks like it might be time to start. Thanks again!
j
Great! Here’s a link to a page in the docs to help get you started! https://docs.prefect.io/core/concepts/schedules.html#schedules