After a new version of a KFP pipeline is uploaded, why does an existing recurring run keep executing the old pipeline, and how do you move its weekly schedule over?
answer
- a recurring run holds a copy
- package path, or pipeline and version IDs
- parameter values fixed at creation
- create anew, then disable the old
- six-field cron, max_concurrency, no_catchup
basics
~20 sA KFP recurring run keeps its own copy of the pipeline spec, or a pinned pipeline version, with fixed parameters. Uploading a new version changes neither, so create a recurring run on the new version and disable the old one.
solid answer
~40 sIn KFP a recurring run (a 'job' in the backend API) is a run configuration plus a trigger. The docs describe it as a copy of a pipeline with all parameter values specified. `kfp.Client.create_recurring_run` takes either `pipeline_package_path`, whose compiled spec is embedded at creation, or `pipeline_id` together with `version_id`; SDK 2.17 raises an error if only one of the two is given. In both cases a later `upload_pipeline_version` leaves the existing recurring run untouched. To move the schedule, upload the new version, call `create_recurring_run(experiment_id=..., job_name=..., cron_expression='0 0 3 * * 1', pipeline_id=..., version_id=<new>, params=...)`, then call `disable_recurring_run` or `delete_recurring_run` on the old ID. Keep `max_concurrency` at its default of 1 for a long pipeline, and set `no_catchup=True` so that a paused schedule does not backfill every missed week.
code
python · 18 linesimport kfp
client = kfp.Client(host='http://localhost:3000')
version = client.upload_pipeline_version(
pipeline_package_path='article_topics.yaml',
pipeline_version_name='2026-10-06',
pipeline_name='article-topics-weekly')
experiment = client.create_experiment(name='article-topics')
client.create_recurring_run(
experiment_id=experiment.experiment_id,
job_name='article-topics-monday',
cron_expression='0 0 3 * * 1', # sec min hour day-of-month month weekday
pipeline_id=version.pipeline_id,
version_id=version.pipeline_version_id,
max_concurrency=1,
no_catchup=True,
params={'test_fraction': 0.2})
client.disable_recurring_run(recurring_run_id='<old-recurring-run-id>')go deeper
Recall that a recurring run is a scheduled, repeatable run inside an experiment, created with kfp.Client.create_recurring_run and a cron or interval trigger.
Explain what the recurring run holds: an embedded spec or a pinned pipeline version, fixed parameters, a six-field cron or an interval, max_concurrency and catch-up behaviour.
Diagnose schedule drift after an upload, move it safely with create plus disable, and check cron format, concurrency and catch-up so that a pause does not trigger a burst of backfill runs.
Decide how pipeline releases reach schedules: whether recurring runs are recreated by a release process from reviewed versions, and who owns turning old schedules off.
## What a recurring run stores In Kubeflow Pipelines (KFP), a **run** is one execution of a pipeline, and a **recurring run**, called a *job* in the backend API, is a repeatable run. The docs define its configuration as **a copy of a pipeline with all parameter values specified**, plus a **run trigger**. A recurring run lives inside an experiment, so `create_recurring_run` takes an `experiment_id`. It can be enabled or disabled, and it can cap how many of its runs execute at once. Two words in that definition explain most surprises. *Copy*: the recurring run does not follow the pipeline's latest state. *All parameter values specified*: every run it spawns receives the same arguments. ## Two ways to point it at a pipeline | Argument to `create_recurring_run` | What the recurring run holds | Effect of a later upload | |---|---|---| | `pipeline_package_path='article_topics.yaml'` | the compiled spec read from your file at creation time | none: the embedded spec is frozen | | `pipeline_id=...` and `version_id=...` | a reference to that one pipeline version | none: it still names the old version | In KFP SDK 2.17 the client requires exactly one of the two forms. Passing both forms raises `ValueError`, and so does passing `pipeline_id` without `version_id`, even though one docstring line suggests that `pipeline_id` alone would use the default version. The SDK call offers no "always use the latest version" option. ## Why the new version is not picked up 1. The team compiles the improved pipeline and calls `upload_pipeline_version(...)`, which creates a new version ID under the same pipeline. 2. The recurring run created last month still holds either its embedded spec or the old `version_id`. 3. Next Monday the trigger fires and starts a run from what the recurring run holds, which is the old graph with the old parameters. 4. The run list looks healthy, because a run appears every week on schedule, so the drift is easy to miss until someone checks the version on a run. ## Moving the schedule 1. Upload the new version and keep the returned `pipeline_id` and `pipeline_version_id`. 2. Create a new recurring run that references them, with the same trigger and parameters, adjusted if the new version changed its inputs. 3. Disable the old recurring run with `disable_recurring_run(recurring_run_id=...)`, or remove it with `delete_recurring_run`. 4. Check the next run's version in the UI before you trust the schedule. The client exposes `create_recurring_run`, `get_recurring_run`, `list_recurring_runs`, `enable_recurring_run`, `disable_recurring_run` and `delete_recurring_run`. It has no call that swaps the pipeline under an existing recurring run, so moving means create plus disable. ## The trigger and its knobs - **`cron_expression` or `interval_second`**, exactly one. Passing both or neither raises `ValueError`. The cron format has **six** fields, seconds first, so `'0 0 3 * * 1'` means 03:00:00 every Monday. A five-field expression copied from a crontab does not fit this layout. - **`start_time` / `end_time`**: RFC3339 strings that bound the schedule. - **`max_concurrency`**: how many runs may execute in parallel, `1` by default. That default protects a long pipeline from overlapping itself. - **`no_catchup`**: with `no_catchup=False`, a schedule that was paused and then re-enabled backfills every missed interval. With `True` it schedules only the latest one. Turn catch-up off when the pipeline handles backfill itself. - **`enabled`**: create the recurring run paused (`False`) and enable it later. - **`enable_caching`**: overrides the compiled caching settings for every run it starts. ## Keeping schedules and versions in step Because nothing moves a schedule automatically, a few habits stop drift from setting in: - Give the pipeline version a name that says what it is, such as a date or a release tag, so that a run's version shows at a glance. - Name the recurring run after its version, or record the version ID in its description, so that an old schedule stands out in `list_recurring_runs`. - Make "create the new recurring run, disable the old one" part of the same release step that uploads the version, rather than a manual follow-up. ## Parameters are frozen too `params={...}` is captured once. A value that has to change each week, such as a data window, cannot be a fixed recurring-run parameter. Derive it inside a step instead, for instance from the run's own scheduled time, which `dsl.PIPELINE_JOB_SCHEDULE_TIME_UTC_PLACEHOLDER` exposes to a component. Deciding *when* a model should retrain is a separate policy question. The recurring run is only the mechanism that carries that decision out.
- Why might a six-field cron copied from a crontab fire at the wrong times?The KFP recurring-run cron has six fields with seconds first, as in the client's own example `'0 0 9 ? * 2-6'`. A five-field crontab line such as `0 3 * * 1` does not follow that layout, so its fields do not mean what its author intended. Write all six fields, for example `'0 0 3 * * 1'` for Mondays at 03:00:00.
- What happens when a paused weekly recurring run is re-enabled after three weeks?With `no_catchup=False` the scheduler catches up on each missed interval, so it starts runs for all three weeks, with no more than `max_concurrency` (1 by default) running at once. With `no_catchup=True` it schedules only the latest interval. Turn catch-up off unless every missed week genuinely needs its own run.
- A recurring run always executes the pipeline's newest uploaded version
- Recurring-run parameter values are re-evaluated before each run
- A five-field crontab expression works unchanged in a KFP recurring run
- Re-enabling a paused recurring run never starts missed runs
- Passing pipeline_id alone in SDK 2.17 picks the default version
Assumes the KFP SDK 2.17.0 client against a 2.17 backend: create_recurring_run requires pipeline_package_path or both pipeline_id and version_id, and takes a six-field cron expression.