hestrator_url"].value

Run pipelines on a scheduleThe Vertex Pipelines orchestrator supports running pipelines on a schedule using its native scheduling capability.

How to schedule a pipeline

from zenml.config.schedule import Schedule

# Run a pipeline every 5th minute

pipeline_instance.run(

schedule=Schedule(

cron_expression="*/5 * * * *"

# Run a pipeline every hour

# starting in one day from now and ending in three days from now

pipeline_instance.run(

schedule=Schedule(

cron_expression="0 * * * *"

start_time=datetime.datetime.now() + datetime.timedelta(days=1),

end_time=datetime.datetime.now() + datetime.timedelta(days=3),

The Vertex orchestrator only supports the cron_expression, start_time (optional) and end_time (optional) parameters in the Schedule object, and will ignore all other parameters supplied to define the schedule.

The start_time and end_time timestamp parameters are both optional and are to be specified in local time. They define the time window in which the pipeline runs will be triggered. If they are not specified, the pipeline will run indefinitely.

The cron_expression parameter supports timezones. For example, the expression TZ=Europe/Paris 0 10 * * * will trigger runs at 10:00 in the Europe/Paris timezone.

How to delete a scheduled pipeline

Note that ZenML only gets involved to schedule a run, but maintaining the lifecycle of the schedule is the responsibility of the user.

In order to cancel a scheduled Vertex pipeline, you need to manually delete the schedule in VertexAI (via the UI or the CLI).

Additional configuration

For additional configuration of the Vertex orchestrator, you can pass VertexOrchestratorSettings which allows you to configure node selectors, affinity, and tolerations to apply to the Kubernetes Pods running your pipeline. These can be either specified using the Kubernetes model objects or as dictionaries.

from zenml.integrations.gcp.flavors.vertex_orchestrator_flavor import VertexOrchestratorSettings

from kubernetes.client.models import V1Toleration