Documentation
Script monitor
Use script monitors for unscheduled jobs that report success or failure themselves. Reports can store metrics and payload data, while alerts can include only a small set of scalar metrics.
How script monitors behave
Script monitors have no schedule and never fail because they are silent. Every accepted ping creates an event and the newest success or failure becomes the monitor’s current state. Use this for ad hoc automation, event-driven workers, and jobs whose cadence varies.
Endpoint and statuses
The monitor page supplies a unique URL in the form /p/YOUR_MONITOR_ID. It accepts GET, JSON POST, URL-encoded forms, and multipart forms.
| Input | Accepted values |
|---|---|
status or state | success, ok, or up; fail, failed, or down |
message | Event summary, up to 1,000 characters |
error_message | Failure detail, up to 2,000 characters |
started_at / finished_at | ISO timestamps; when both are valid, Cronity calculates duration |
metrics | A JSON object used by report previews and, optionally, alerts |
payload | A JSON object stored with the event |
alarm | true, 1, yes, or on requests an on-demand alert when the plan permits it |
Examples
# Simple success
curl -fsS 'https://your-cronity-domain/p/YOUR_MONITOR_ID'
# Rich result
curl -fsS -X POST 'https://your-cronity-domain/p/YOUR_MONITOR_ID' \
-H 'Content-Type: application/json' \
-d '{
"status": "success",
"message": "Customer export complete",
"started_at": "2026-07-23T05:58:10Z",
"finished_at": "2026-07-23T06:02:42Z",
"metrics": { "records_exported": 428 },
"payload": { "batch_id": "exp_1042" }
}'Unknown top-level JSON keys are also stored as payload fields. Control fields such as status and metrics are kept separate.
Alerts and data limits
- “Alert on fail” and “Alert on every successful check-in” create point-in-time notifications for those events.
alarm=1can request an alert independently of those switches on Pro and Business plans.- When metrics in alerts are enabled, at most five small scalar metrics are shown. Nested values and full payloads are never sent in alerts.
- Payload size, daily event volume, and daily alert volume are limited by the account plan. Oversized requests return HTTP 413; exhausted event allowance returns HTTP 429.
A successful HTTP response from the ping endpoint is JSON such as
{"ok":true,"status":"success"}. Use curl -f or check the response status so your job notices rejected reports.