Scheduled Webhooks Reference
Field definitions, cron syntax, and execution behavior for scheduled webhooks.
This reference describes the fields and execution rules for Phemeral scheduled webhooks.
Overview
A scheduled webhook is a saved HTTP request that Phemeral executes on a UTC cron schedule against a selected environment.
Each scheduled webhook is:
- configured from the project's Settings tab
- bound to one environment
- executed against that environment's oldest active domain
- routed to the environment's current deployment
For setup instructions, see Configure Scheduled Webhooks.
Cron Syntax
Scheduled webhooks use a UTC 6-field cron expression.
second minute hour day-of-month month day-of-weekExamples
| Meaning | Expression |
|---|---|
| Every 10 seconds | */10 * * * * * |
| Every 30 seconds | */30 * * * * * |
| Every hour at minute 15 | 0 15 * * * * |
| Every day at 03:00 UTC | 0 0 3 * * * |
| Every Monday at 09:30 UTC | 0 30 9 * * 1 |
All schedules are interpreted in UTC.
Field Reference
| Field | Required | Description |
|---|---|---|
| Name | Yes | Human-readable label shown in the dashboard. |
| Environment | Yes | The environment whose current deployment receives the request. |
| Relative path | Yes | Request path beginning with /, such as /api/jobs/daily. |
| Method | Yes | HTTP method used for the request. |
| Schedule | Yes | UTC 6-field cron expression. |
| Headers | No | Custom HTTP headers sent with the request. |
| Body | No | Request body sent for methods such as POST, PUT, or PATCH. |
| Expected status codes | No | Comma-separated HTTP status codes treated as successful. |
| Starts at | No | UTC ISO 8601 timestamp after which the schedule becomes active. |
| Expires at | No | UTC ISO 8601 timestamp after which the schedule stops running. |
| Retries | No | Number of retry attempts after a failed execution. |
| Disabled | No | When enabled, the webhook remains saved but does not run. |
Method Values
Scheduled webhooks support these HTTP methods:
GETPOSTPUTPATCHDELETEHEADOPTIONS
Expected Status Codes
If Expected status codes is provided, Phemeral treats only those response codes as successful.
Examples:
200200,201200,201,202,204
If the field is left empty, any HTTP status code is accepted as successful.
Each status code must be between 100 and 599.
Time Window Rules
Starts at and Expires at must both be UTC ISO 8601 timestamps when provided.
Examples:
2026-05-01T00:00:00Z2026-05-01T12:30:00+00:00
Rules:
- Timestamps must include timezone information.
- The timezone must be UTC.
- If both fields are set,
starts_atmust be earlier thanexpires_at.
Domain Resolution
Scheduled webhooks run only when the selected environment has at least one active domain.
Execution uses the environment's oldest active domain in canonical order.
Behavior:
- A new scheduled webhook cannot be saved without an active domain.
- If the active domain set changes, Phemeral resyncs the scheduled webhook.
- If no active domain is available, the webhook remains saved but cannot execute until a domain becomes active again.
Execution Semantics
When a scheduled webhook fires, Phemeral sends the configured request to the selected environment's active domain and relative path.
Because the request targets the environment rather than a fixed deployment:
- the webhook automatically follows new current deployments
- you do not need to update the webhook after each deploy
- runtime logs appear on whichever deployment handled that request
Validation Rules
Phemeral applies these validation rules when saving a scheduled webhook:
- name must be non-empty
- environment must belong to the selected project
- path must be a non-empty relative path
- schedule must be a valid UTC 6-field cron expression
- retries must be zero or greater
- expected status codes must be valid HTTP status codes
starts_atandexpires_atmust be valid UTC timestamps
Runtime Visibility
Scheduled webhook requests are regular HTTP requests to your application. You can inspect them through:
- deployment runtime logs
- application logs emitted by the endpoint
- application-side effects such as writes, cache refreshes, or background work