Engine · Available
Trigger
Schedules and manual invoke — ingress only.
@keystone/engine-trigger
Purpose
Ingress for time and demand. Cron schedules and manual invokes publish events; Trigger never evaluates rules or executes domain actions. Automation (and others) subscribe and do the work.
In a product
Weekday 7am “Daily briefing” schedule fires → Automation queries trackers, optionally asks AI, and notifies owners.
How it works
- You create a schedule with a cron expression, timezone, and optional linked rule ids.
- A runner calls fireDueSchedules (or a host cron hits the API) when times are due.
- Trigger publishes trigger.schedule.fired or trigger.manual.invoked — nothing more.
- Automation matches those events and runs the actual actions.
Capabilities
- Cron schedule CRUD with timezone and next/last run tracking
- fireDueSchedules (including dry-run) → trigger.schedule.fired
- invokeManual → trigger.manual.invoked
- Cron validation and next-due helpers
- API under /v1/triggers (schedules, invoke, fire-due)
Related
Event · Automation · Report · Notification · Billing