https://prefect.io logo
Title
n

Nathan Walker

04/12/2021, 6:06 PM
Hey folks, I'd like to be able to push a Flow Group's start date back arbitrarily to act as a hacky "Delay Run" method. I'm seeing that the mutation set_flow_group_schedule should do the trick, but its input parameters only give "timezone" as an option. This makes sense since you can pass in multiple clocks, but both the cron_clock_input and interval_clock_input lack start_date as well in the API. It looks like when you use the API to create/update a Flow Group's schedule, it just plops datetime.now() in as the start date, but I'd like to be able to define it per clock. Can somebody point me in the right direction on adding functionality like this to Apollo/Hasura?
k

Kevin Kho

04/12/2021, 6:22 PM
Hey @Nathan Walker, just wanna make sure I understand this right, you want to add a Clock, but not have it be effective immediately and you want it to be effective after a certain start date?
n

Nathan Walker

04/12/2021, 6:24 PM
Hey Kevin, yeah, that's it. I just want the Flow Group clocks in the API to function like they do when I hard-code them for a Flow in Python.
k

Kevin Kho

04/12/2021, 6:28 PM
Gotcha so you’re saying that the Python API lets you put a start_date but the GraphQL API doesn’t have such a feature?
I am less familiar with this so I’ll ask the team and get back to you
n

Nathan Walker

04/12/2021, 6:31 PM
I'm not sure exactly what you mean - could you define "Python API"? I don't mean making API calls directly in Python, I mean creating a CronClock or IntervalClock instance in Python allows you to pass start_date.
k

Kevin Kho

04/12/2021, 6:32 PM
Oh I just meant using this https://docs.prefect.io/api/latest/schedules/clocks.html . Yep we’re on the same page!
n

Nathan Walker

04/12/2021, 6:33 PM
Same page! Great. Yes, then the Python API allows you to specify start_date but the GraphQL API doesn't.
👍 1
k

Kevin Kho

04/12/2021, 8:05 PM
Can you put an issue in the server repo to support future start dates with the GraphQL API?
n

Nathan Walker

04/12/2021, 8:11 PM
For sure!
k

Kevin Kho

04/12/2021, 8:15 PM
Thank you! 🙂