Scheduling
Learn how to create, update, activate, deactivate, and delete schedules for pipelines.
Schedules don't work for all orchestrators. Here is a list of all supported orchestrators.
Native Schedule Management means the orchestrator supports updating and deleting schedules directly through ZenML commands. When supported, commands like zenml pipeline schedule update and zenml pipeline schedule delete will automatically update/delete the schedule on the orchestrator platform (e.g., Kubernetes CronJobs). For orchestrators without this support, you'll need to manually manage schedules on the orchestrator side.
Check out our tutorial on scheduling for a practical guide on how to schedule a pipeline.
Set a schedule
Check out our SDK docs to learn more about the different scheduling options.
Update a schedule
You can update your schedule's cron expression:
Activate and deactivate a schedule
You can temporarily pause a schedule without deleting it using the deactivate command, and resume it later with activate:
For the Kubernetes orchestrator, activate/deactivate controls the CronJob's suspend field - this is a native Kubernetes feature that pauses schedule execution without removing the CronJob resource.
Delete a schedule
Deleting a schedule archives it by default (soft delete), which preserves references in historical pipeline runs that were triggered by this schedule:
Using --hard permanently removes the schedule and any historical references to it. Pipeline runs that were triggered by this schedule will no longer show the schedule association.
Orchestrator support for schedule management
The functionality of these commands changes depending on whether the orchestrator supports schedule updates/deletions (see the "Native Schedule Management" column in the table above):
Kubernetes orchestrator: Fully supports native schedule management. Update and delete commands will modify/remove the actual CronJob on the cluster as well as the schedule information in ZenML.
Other schedulable orchestrators: Only update/delete the schedule information stored in ZenML. The actual schedule on the orchestrator remains unchanged.
If the orchestrator does not support native schedule management, maintaining the lifecycle of the schedule on the orchestrator side is the responsibility of the user. In these cases, we recommend the following steps:
Find schedule on ZenML
Match schedule on orchestrator side and delete
Delete schedule on ZenML
Re-run pipeline with new schedule
A concrete example can be found on the GCP Vertex orchestrator docs, and this pattern can be adapted for other orchestrators as well.
Last updated
Was this helpful?