π’ Deployments now support multiple schedules π
With todayβs release, weβre excited to roll out initial support for using multiple schedules with Deployments! You can now use multiple schedules in the following ways:
- Specifying schedules in a Deployment YAML file
- Creating Python-based Deployments with the
Deployment
class - New CLI commands:
prefect deployment schedule <create, delete, pause, resume, ls, clear>
- New UI components aware of multiple schedules
Coming soon, weβll round out support for multiple schedules in other areas, such as:
- When running a flow with
flow.serve()
andflow.deploy()
- When using
prefect deploy
The easiest way to get started with multiple schedules is to try out the new CLI commands:
$ prefect deployment schedule ls happy-flow/my-deployment
Deployment Schedules
ββββββββββββββββββββββββββββββββββββββββ³ββββββββββββββββββ³βββββββββ
β ID β Schedule β Active β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β c7d3ddc4-9a5a-4dec-bd59-eed282ae55d5 β cron: 0 0 1 * 1 β True β
ββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββ΄βββββββββ
$ prefect deployment schedule create happy-flow/my-deployment --interval 60
Created deployment schedule!
$ prefect deployment schedule ls happy-flow/my-deployment
Deployment Schedules
ββββββββββββββββββββββββββββββββββββββββ³βββββββββββββββββββββ³βββββββββ
β ID β Schedule β Active β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β 3638ed58-cab2-4462-a680-2f92fcf6c797 β interval: 0:01:00s β True β
β c7d3ddc4-9a5a-4dec-bd59-eed282ae55d5 β cron: 0 0 1 * 1 β True β
ββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββ΄βββββββββ
Enhancements
- Add support for deploying to a process work pool using
flow.deploy
anddeploy
β #12017 - Add support for multiple schedules to Prefect server and CLI β #11971
- Add CLI command to read runs in a work queue β #11989
Fixes
- Update the text for the CLI command
deployment run --help
so it renders for more args β #11960 - Fix
Flow.with_options
logic for retries, retry_delay_seconds, flow_run_name β #12020 - Fix memory leaks related to cancellation scopes and async contextvar usage β #12019
- Revert the recent change that runs on the main thread while we investigate a concurrency issue β #12054
- Add a more readable error if Docker is not running β #12045
Documentation
- Improve language and formatting in Profiles and Configuration guide β #11996
- Improves docs formatting consistency and adds some minor content updates β #12004
- Updates formatting for guide: creating-interactive-workflows.md β #11991
- Add import statement for
wait_for_flow_run
β #11999 - Add deep dive on overriding job variables β #12033
- Remove extraneous trailing quotation marks in concepts/artifacts docs β #12040
- Add links to overriding job variables guide β #12043
- Update scheduling docs to include information about multiple schedules β #12064
Experimental
- Only allow using
Task.submit()
for autonomous task submission β #12025
Contributors
- @hamzamogni made their first contribution in #12000
- @eladm26 made their first contribution in #12045
Full release notes: https://github.com/PrefectHQ/prefect/blob/main/RELEASE-NOTES.md