LogoLogo
ProductResourcesGitHubStart free
  • Documentation
  • Learn
  • ZenML Pro
  • Stacks
  • API Reference
  • SDK Reference
  • Getting Started
    • Welcome to ZenML
    • Installation
    • Hello World
    • Core Concepts
    • System Architecture
  • Deploying ZenML
    • Deploy
      • Deploy with Docker
      • Deploy with Helm
      • Deploy using HuggingFace Spaces
      • Deploy with custom images
      • Secret management
      • Custom secret stores
    • Connect
      • with your User (interactive)
      • with an API Token
      • with a Service Account
    • Manage
      • Best practices for upgrading
      • Using ZenML server in production
      • Troubleshoot your ZenML server
      • Migration guide
        • Migration guide 0.13.2 → 0.20.0
        • Migration guide 0.23.0 → 0.30.0
        • Migration guide 0.39.1 → 0.41.0
        • Migration guide 0.58.2 → 0.60.0
  • Concepts
    • Steps & Pipelines
      • Configuration
      • Scheduling
      • Logging
      • Advanced Features
      • YAML Configuration
    • Artifacts
      • Materializers
      • Visualizations
    • Stack & Components
    • Service Connectors
    • Containerization
    • Code Repositories
    • Secrets
    • Tags
    • Metadata
    • Models
    • Templates
    • Dashboard
  • Reference
    • Community & content
    • Environment Variables
    • llms.txt
    • FAQ
    • Global settings
    • Legacy docs
Powered by GitBook
On this page
  • Set a schedule
  • Update/Pause/Stop a schedule

Was this helpful?

Edit on GitHub
  1. Concepts
  2. Steps & Pipelines

Scheduling

Learn how to set, pause and stop a schedule for pipelines.

PreviousConfigurationNextLogging

Last updated 12 days ago

Was this helpful?

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

Orchestrator
Scheduling Support
Supported Schedule Types

✅

Cron, Interval

✅

Cron, Interval

✅

Cron only

✅

Cron, One-time

✅

Cron, Interval

✅

Cron only

⛔️

N/A

⛔️

N/A

✅

Cron, Interval, One-time

⛔️

N/A

⛔️

N/A

⛔️

N/A

⛔️

N/A

⛔️

N/A

✅

Cron only

Check out for a practical guide on how to schedule a pipeline.

Set a schedule

from zenml.config.schedule import Schedule
from zenml import pipeline
from datetime import datetime

@pipeline()
def my_pipeline(...):
    ...

# Use cron expressions
schedule = Schedule(cron_expression="5 14 * * 3")
# or alternatively use human-readable notations
schedule = Schedule(start_time=datetime.now(), interval_second=1800)

my_pipeline = my_pipeline.with_options(schedule=schedule)
my_pipeline()

Update/Pause/Stop a schedule

The way pipelines are scheduled depends on the orchestrator you are using. For example, if you are using Kubeflow, you can use the Kubeflow UI to stop or pause a scheduled run. However, the exact steps for stopping or pausing a scheduled run may vary depending on the orchestrator you are using. We recommend consulting the documentation for your orchestrator to learn the current method for stopping or pausing a scheduled run.

The normal pattern for updating a schedule is:

  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

Note that ZenML only gets involved to schedule a run, but maintaining the lifecycle of the schedule (as explained above) is the responsibility of the user. If you run a pipeline containing a schedule two times, two scheduled pipelines (with different/unique names) will be created.

Check out our to learn more about the different scheduling options.

A concrete example can be found on the docs, and this pattern can be adapted for other orchestrators as well.

our tutorial on scheduling
SDK docs
GCP Vertex orchestrator
AirflowOrchestrator
AzureMLOrchestrator
DatabricksOrchestrator
HyperAIOrchestrator
KubeflowOrchestrator
KubernetesOrchestrator
LocalOrchestrator
LocalDockerOrchestrator
SagemakerOrchestrator
SkypilotAWSOrchestrator
SkypilotAzureOrchestrator
SkypilotGCPOrchestrator
SkypilotLambdaOrchestrator
TektonOrchestrator
VertexOrchestrator