Example requests
Ask your coding agent what should happen and how often. It can set up the schedule and attach it.“Every weekday at 8am, run the morning briefing workflow and post it to Slack.”
“On the first of each month, have the FP&A agent review recurring charges and flag anything unused.”
“Every night, sync new rows from the form submissions table in Postgres into the reporting spreadsheet.”
Define a schedule
UsedefineCronSource with a slug and a cron schedule, then attach a target.
src/triggers/morning-check.ts
| Option | Required | What it does |
|---|---|---|
slug | Yes | Stable trigger slug (used in the attachment id and run history) |
schedule | Yes | A cron expression for when the trigger fires |
The cron schedule
Theschedule is a standard cron expression. The common five-field form is minute hour day-of-month month day-of-week:
MON, JAN) and shorthand nicknames (@daily, @hourly) are also accepted.
Cron expressions have no timezone option. They evaluate against the runtime clock: UTC on the hosted platform, and your machine’s local time under
keystroke dev. For a specific local time in production, convert it to UTC in the expression (for example, 9am US Eastern is 0 13 * * * or 0 14 * * * depending on daylight saving).Empty input
A schedule fires on time alone; there is no inbound payload. A schedule attached to a workflow runs it with an empty input ({}), so its workflow should accept an empty object:
prompt (or a prompt() function that ignores its argument):
src/triggers/morning-check.ts
Test it while building
You don’t have to wait for the clock. Invoke the target directly while developing:keystroke triggers runs list morning-check --workflow <target-slug> (or --agent <target-slug>).
Next steps
Polling
Run on a schedule, but only when there’s new work.
Webhooks
Run on inbound HTTP requests instead of a clock.
Advanced triggers
Agent prompts, transforms, and filtering.
Triggers overview
Sources, attach, and attachment ids.