Schedule and delete a trigger¶
Goal: publish an event to a topic on a schedule (a cron expression) or once at a point in time, so workers subscribed to that topic run; and delete the trigger again.
Prerequisites
- An active context (Switch context).
- The target topic the worker listens on, e.g.
trigger.everyminute.
Schedule¶
- Open Triggers: Infra top tab,
3(Triggers) in the default layout. - Press
a. The Schedule Trigger dialog opens. -
Fill it in:
Field What to enter Name A unique name, e.g. my-trigger(required).Cron / Point-in-time Choose the mode. Schedule (cron expression) Cron mode: six fields, seconds first; the placeholder 0 * * * * *fires at second 0 of every minute.Due time (RFC 3339 / Go duration) Point-in-time mode: 30s, or2026-01-01T00:00:00Z.Target topic The topic it publishes to, e.g. trigger.everyminute(required).Repeats (0 = indefinite) How often it fires; 0forever.TTL Optional: how long the trigger lives. -
Press Schedule.
Delete¶
- On Infra › Triggers, highlight the trigger.
- Press
d, answer yes toDelete trigger '<name>'?.
What you should see¶
- The trigger as a row: Name, Schedule, Target Topic, Repeats (
∞for 0), TTL (-when unset). It disappears after a delete. - Its events on the target topic: add the topic on Infra › Events (
a) to watch them arrive (Browse state and watch live events). - The schedule and the delete on Infra › Changes.
Troubleshooting¶
| Symptom | Cause and fix |
|---|---|
Name is required / Target topic is required / Schedule is required / Due time is required |
Fill in the field the dialog names. |
An error toast Schedule: ... |
The api refused the trigger (e.g. a malformed cron expression or due time); the reason is in the toast and on Infra › Alerts. |
| Nothing reacts to the trigger | No worker subscribes to the target topic; check the worker's Topics on Infra › Workers. |
From the AI tab: "create trigger firing every minute publishing to
trigger.everyminute" (triggers__schedule), "delete trigger my-trigger"
(triggers__delete). Reference: Keybindings › Triggers.