Skip to content

Configuring Cron Triggers

Call a webhook on a recurring schedule defined by a cron expression

cron cron trigger scheduled recurring background jobs periodic webhook

Cron triggers call a webhook on a recurring schedule defined by a cron expression. Use them for periodic background jobs — cleanup tasks, report generation, digest emails, or data checks.

Expressions follow the format minute hour day-of-month month day-of-week and run in UTC.

ExpressionDescription
* * * * *Every minute
*/5 * * * *Every 5 minutes
*/30 * * * *Every 30 minutes
0 * * * *Every hour (at minute 0)
0 0 * * *Daily at midnight
0 9 * * 1-5Weekdays at 9:00 AM

The dashboard provides preset suggestions matching these common patterns.

Navigate to EventsCron Triggers, then click New Cron Trigger.

Create Cron Trigger

FieldDescription
Cron Trigger NameUnique identifier (e.g. stale_todos_check)
CommentOptional description of what the trigger does
Webhook URL or templateEndpoint URL. Supports {{ENV_VAR}} syntax (e.g. {{NHOST_FUNCTIONS_URL}}/events/stale-todos)
Schedule (Cron Expression)Cron expression with preset suggestions dropdown
PayloadJSON object sent in the webhook body
Retry and Headers Settings (accordion)Retry count, interval, timeout, tolerance (max seconds a late invocation can still fire), and custom HTTP headers
Request Options (accordion)Request options transform and payload transform (see Transformations)

Cron triggers deliver an HTTP request to any endpoint. The default method is POST, but you can change it using request transformations. The request body contains a payload field with the JSON you configured, not database row data.

Cron triggers deliver schedule metadata and the custom JSON payload you configured in the trigger definition.

{
"scheduled_time": "2024-01-15T12:00:00.000Z",
"payload": {},
"name": "stale_todos_check",
"comment": "Checks for incomplete todos not updated in 7+ days, marks them stale, and notifies owners."
}
FieldDescription
scheduled_timeISO 8601 timestamp of the scheduled invocation (UTC)
payloadThe JSON object configured in the trigger definition
nameThe cron trigger name
commentThe optional comment/description from the trigger definition

For working handler examples, see:

The cron trigger sidebar in Events > Cron Triggers lists all triggers. Each trigger has Edit and Delete actions.

Selecting a trigger opens its detail page with two tabs:

Displays the trigger configuration: name, comment, schedule, webhook URL, retry settings (including tolerance), payload, request headers, and transformation configuration.

Cron Trigger Overview

Lists all scheduled invocations for this cron trigger. Filter by status using the “Status” header buttons at the top: Scheduled, Processed, Failed, or All.

Cron Trigger Events

Each event shows its scheduled time, status, ID, and number of tries. Scheduled events that have not yet fired can be deleted individually.

Expand an event to see its invocation logs. Each invocation shows the HTTP status code and a View Details action that opens the full request and response.