Create cron trigger
Changed onCreates a cron trigger that fires on a schedule. A trigger targeting an agent profile launches a new agent from the profile's current config on each firing; a trigger targeting an agent sends an input to that agent. Missed firings are coalesced, matching standard cron behavior: if one or more scheduled times pass while firing is delayed, the trigger fires once for the oldest missed time and then resumes its schedule from the current time, without retroactively firing for the other missed times.
Request
- Base URLhttps://api.omnara.com/v1
- Auth
- HTTP bearer
- or API key in cookie __Host-omnara_session and API key in header X-Omnara-Csrf
Path parameters
Organization ID (org_...).
Project ID (proj_...).
Headers
Idempotency key for replay-safe mutating requests.
Request body
Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.
What each firing does: type agent sends the message to an existing agent, type profile launches a new agent from a profile, and type integration hands the firing to an integration, such as a new Slack or Discord thread.
Standard five-field cron expression (minute, hour, day of month, month, day of week). TZ=/CRON_TZ= prefixes are rejected; set the timezone field instead.
IANA time zone the schedule is evaluated in.
Go text/template rendered on each firing to produce the message sent to the target. The template receives a trigger value with name, fired_at, last_fired_at, and local_date fields. Timestamps remain UTC; local_date is the scheduled occurrence's ISO date in the schedule timezone. Required for agent and profile targets; omitted for integration targets, which use their own settings. Rendering is capped at 64 KiB of output and one second of wall-clock time, and printf width and precision specifiers are capped at 1024; a firing whose template fails to render is recorded in failure_report without sending a message.
Whether the trigger fires on schedule; false pauses it.
Response
Existing cron trigger returned.
Project ID (proj_...).
Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.
What each firing does: type agent sends the message to an existing agent, type profile launches a new agent from a profile, and type integration hands the firing to an integration, such as a new Slack or Discord thread.
Standard five-field cron expression (minute, hour, day of month, month, day of week). TZ=/CRON_TZ= prefixes are rejected; set the timezone field instead.
IANA time zone the schedule is evaluated in.
Go text/template rendered on each firing to produce the message sent to the target. The template receives a trigger value with name, fired_at, last_fired_at, and local_date fields. Timestamps remain UTC; local_date is the scheduled occurrence's ISO date in the schedule timezone. Required for agent and profile targets; omitted for integration targets, which use their own settings. Rendering is capped at 64 KiB of output and one second of wall-clock time, and printf width and precision specifiers are capped at 1024; a firing whose template fails to render is recorded in failure_report without sending a message.
Changes
- breaking
the response property
message_templatebecame optional for the status - breaking
the response property
message_templatebecame optional for the status - breaking
added to the
targetresponse propertyoneOflist for the response status
8 more changes in this revision
- breaking