Nico Neumann
03/17/2022, 5:03 PMflow.schedule = Schedule(clocks=[CronClock("* * * * *")]) which works fine and later want to add another schedule or delete the current one. My idea is to use GraphQL with the set_flow_group_schedule and delete_flow_group_schedule methods.Kevin Kho
Nico Neumann
03/17/2022, 5:15 PMquery {
    flow {
      id
      name
      flow_group_id
      schedule
    }
}
And I can see it:
...
"flow_group_id": "{flow_group_id}",
"schedule": {
    "clocks": [
      {
        "cron": "* * * * *",
        "type": "CronClock",
        "day_or": true,
        "labels": null,
        "end_date": null,
        "start_date": null,
        "__version__": "1.1.0",
        "parameter_defaults": {}
      }
    ],
    "filters": [],
    "or_filters": [],
    "__version__": "1.1.0",
    "adjustments": [],
    "not_filters": []
  }
},
...
Now I want to delete the schedule using the flow_group_id and I get success=true back:
mutation {
    delete_flow_group_schedule(input: {
      flow_group_id: "{flow_group_id}") {
        success
    }
}
But when I run the query again, my schedule is still there and running. I also checked it in the Prefect Cloud UI. It says I cannot delete it trough the UI because it was created through code.
When I add a schedule through UI now for testing, I can delete it with the delete_flow_group_schedule  command above. But I cannot delete the schedule created through the code.Kevin Kho
Nico Neumann
03/17/2022, 5:17 PMflow.schedule  and the one created through the UI at flow.flow_group.scheduleKevin Kho
Kevin Kho
flow.schedule. Would using the flow_group schedule work for your use case? Could you tell me more?Nico Neumann
03/17/2022, 5:25 PMset_flow_group_schedule to set it? In this way I should then be able to delete it later with delete_flow_group_schedule?Kevin Kho
Nico Neumann
03/17/2022, 5:31 PMKevin Kho