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, name, description, and a cron schedule, then attach a target.
src/triggers/morning-check.ts
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.
Pass an optional IANA timezone so the cron fields are wall-clock times in that zone (DST-aware). When omitted, schedules evaluate in UTC:
Prefer
timezone for wall-clock times like “9am” in a specific region. Without it, "0 9 * * *" means 09:00 UTC.Input / payload
By default a schedule fires with an empty input ({}). Pass an optional static payload on the source when the workflow needs input — it flows to attachments the same way a webhook body does:
src/triggers/morning-report.ts
transform, the payload must match the workflow’s input schema (TypeScript enforces this at the .attach() call). Use transform to reshape the payload per attachment:
payload is omitted, attachments still receive {}, so empty-input workflows keep working:
prompt, or a prompt(payload) function that reads the cron payload:
src/triggers/morning-check.ts
Test it while building
You don’t have to wait for the clock. After deploy, fire the cron trigger immediately (same static payload as a scheduled tick — platform only):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.