Scheduling

Learn how to create, update, activate, deactivate, and delete schedules for pipelines.

circle-info

Schedules don't work for all orchestrators. Here is a list of all supported orchestrators.

circle-info

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 schedulingarrow-up-right for a practical guide on how to schedule a pipeline.

Set a schedule

circle-info

Check out our SDK docsarrow-up-right 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:

circle-info

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:

circle-exclamation

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:

  1. Find schedule on ZenML

  2. Match schedule on orchestrator side and delete

  3. Delete schedule on ZenML

  4. Re-run pipeline with new schedule

A concrete example can be found on the GCP Vertex orchestratorarrow-up-right docs, and this pattern can be adapted for other orchestrators as well.

Last updated

Was this helpful?