server
server copied to clipboard
Setting certain Cron schedules throws API errors (but sets the schedule properly)
Description
When setting a Cron schedule on a flow group from the UI, a list of schedules is sent like this:
[{ "type": "CronClock", "cron": "* * * * * *" }]
but with some valid Cron strings like 0 10-20 * * *
, the API throws an error:
Error: GraphQL error: Invalid clock provided for schedule: {'type': 'CronClock', 'cron': '0 10-20 * * *', 'parameter_defaults': {}}
However, the schedule is still set and runs are created properly. It seems this has something to do with parameters being passed to the schedule but I haven't been able to figure out what that could be.
Expected Behavior
No error is thrown.
Reproduction
None at the moment, documenting this so we're aware.
Environment
Prefect Cloud
it didn't respect the parameter update: https://cloud.prefect.io/prefect-sales-and-operations/flow-run/fc0f5596-b230-4aca-96a7-8b17dfb49013?overview=
There was a problem creating your schedule, please try again shortly. Error message: Error: GraphQL error: Invalid clock provided for schedule: {'type': 'CronClock', 'cron': '0 * * * *', 'parameter_defaults': {'Email Recipient': '[email protected]', "Emails to CC ('[email protected],[email protected]')": '[email protected],[email protected],[email protected]', 'sfdc_domain': None}, 'start_date': {'dt': '2021-09-23T13:33:58.991820', 'tz': 'America/New_York'}}
tried for interval schedule as well