Skip to content
SupportDashboard

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.

Expression Description
* * * * * Every minute
*/5 * * * * Every 5 minutes
*/30 * * * * Every 30 minutes
0 * * * * Every hour (at minute 0)
0 0 * * * Daily at midnight
0 9 * * 1-5 Weekdays 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

Field Description
Cron Trigger Name Unique identifier (e.g. stale_todos_check)
Comment Optional description of what the trigger does
Webhook URL or template Endpoint URL. Supports {{ENV_VAR}} syntax (e.g. {{NHOST_FUNCTIONS_URL}}/events/stale-todos)
Schedule (Cron Expression) Cron expression with preset suggestions dropdown
Payload JSON 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."
}
Field Description
scheduled_time ISO 8601 timestamp of the scheduled invocation (UTC)
payload The JSON object configured in the trigger definition
name The cron trigger name
comment The 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.