Schedule and delete a trigger¶
Goal: publish an event on a topic on a schedule (cron) or once at a point in time, so workers subscribed to that topic act on it; and remove the trigger again.
Prerequisites
- Signed in as an admin.
- The target context is active; on a protected context each write asks first.
- The target topic your worker listens on (e.g.
trigger.everyminute).
Steps: schedule¶
- Open Infra > Triggers (route
/infra/triggers). - Press Schedule… The dialog Schedule a trigger opens.
- Name: e.g.
every-minute. - Mode:
- Cron: Schedule (cron expression), six fields with seconds, e.g.
0 * * * * *(every minute at second 0). - Point in time: Due time (RFC 3339 or a Go duration), e.g.
30sor2026-01-01T00:00:00Z.
- Cron: Schedule (cron expression), six fields with seconds, e.g.
- Target topic: e.g.
trigger.everyminute. - Repeats (0 = indefinitely) and, optionally, TTL.
- Schedule. A problem with the form is shown above the buttons.
Steps: delete¶
- Select the trigger's row on Infra > Triggers.
- Delete… The dialog Delete trigger '
<name>'? shows its schedule and target topic. - Delete.
What you should see¶
- The trigger's row: Name, Schedule or Due time, Target topic, Repeats (∞ for 0), TTL, Owner worker. The table updates by itself (the api announces each scheduled or deleted trigger).
- Its events on the target topic: Infra > Events → Topics… → the target topic → Follow.
- Infra > Changes: the schedule and the delete.
Troubleshooting¶
| Symptom | Cause and fix |
|---|---|
| Name is required, Target topic is required, Schedule is required / Due time is required | Fill the field named. Scripts and the assistant must give a schedule or a dueTime, not both. |
| Repeats must be a whole number, 0 for indefinitely | Repeats takes 0, 1, 2, … |
| The trigger fires but nothing happens | No worker subscribes to the target topic, or it listens on another one: compare with the worker's topics in Infra > Workers. |
| Buttons disabled, read only | You are not an admin. |
More: Views > Triggers.