From 4f84e4939909096d3ad92c3c4b96620a6340f92a Mon Sep 17 00:00:00 2001 From: Bartosz Luczynski Date: Wed, 5 Aug 2026 16:31:41 -0400 Subject: [PATCH] docs(flyte-sdk-run): add trigger CLI lifecycle cookbook Add a `Managing Triggers` section covering create / deactivate / re-activate / delete lifecycle recipes with the `flyte {create,update,delete} trigger` family, plus a callout for the positional-argument-order inversion between `create` (TASK_NAME NAME) and `update`/`delete` (NAME TASK_NAME). Zero coverage of `flyte update trigger --activate/--deactivate` or `flyte delete trigger` currently exists across any of the 10 SDK skills; `flyte-sdk-agent` has a single `create trigger` example in an agent-specific context, but the full lifecycle recipes aren't documented anywhere. Verified against flyte 2.5.15. --- plugins/flyte/skills/flyte-sdk-run/SKILL.md | 62 +++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/plugins/flyte/skills/flyte-sdk-run/SKILL.md b/plugins/flyte/skills/flyte-sdk-run/SKILL.md index 31cf8d6..899b3b1 100644 --- a/plugins/flyte/skills/flyte-sdk-run/SKILL.md +++ b/plugins/flyte/skills/flyte-sdk-run/SKILL.md @@ -225,6 +225,68 @@ result = flyte.run( ) ``` +## Managing Triggers + +Triggers schedule a task to run on a cron. Full lifecycle CLI: + +### Create a trigger + +```bash +flyte create trigger \ + --schedule "0 9 * * 1" \ + --project flytesnacks --domain development +``` + +The task name comes first, then the trigger name (see the CLI arg-order note +below). `--schedule` is required and accepts any cron expression. + +### Deactivate (pause but keep registered) + +```bash +flyte update trigger \ + --deactivate \ + --project flytesnacks --domain development +``` + +The trigger stays registered — the task is not re-deployed — but no new runs +fire until reactivation. Useful for pausing a schedule during a data outage, +a downstream freeze, or a debug window. + +### Re-activate + +```bash +flyte update trigger \ + --activate \ + --project flytesnacks --domain development +``` + +`--activate` and `--deactivate` are mutually exclusive; exactly one is required. + +### Delete permanently + +```bash +flyte delete trigger \ + --project flytesnacks --domain development +``` + +Removes the trigger from the cluster. The task itself is untouched — this +operates on the schedule binding only. + +### CLI arg-order gotcha + +`flyte create trigger` takes `TASK_NAME NAME`, but `flyte update trigger` and +`flyte delete trigger` take `NAME TASK_NAME` — the positional order is +inverted between creation and mutation. Verify with: + +```bash +flyte create trigger --help # Usage: flyte create trigger [OPTIONS] TASK_NAME NAME +flyte update trigger --help # Usage: flyte update trigger [OPTIONS] NAME TASK_NAME +flyte delete trigger --help # Usage: flyte delete trigger [OPTIONS] NAME TASK_NAME +``` + +If you get `Error: Trigger '' not found for task ''`, you may have the +args in create-order instead of update-order. + ## Running Tasks (vs Workflows) ### Run a single task