Signals

The end of a ping URL says what happened. The plain URL means the job succeeded. The others report a start, a failure, an exit status or a note for the log.

SignalURLEffect
Success/<uuid>The check is up, and the next ping is due on schedule.
Start/<uuid>/startA run is in progress. Crony times it, and alerts if it never finishes.
Failure/<uuid>/failThe check goes down at once, and alerts go out.
Log/<uuid>/logStored in the check's log. The state does not change.
Exit status/<uuid>/<0-255>0 counts as success, and 1 to 255 as failure. The number is kept with the ping.

Report failures straight away

Without a failure signal, a failed run shows up only when its ping is overdue. Send the exit status instead, and Crony knows the moment the job fails:

/usr/local/bin/backup.sh
curl -fsS -m 10 --retry 5 -o /dev/null https://staging.crony.sh/ping/f3a1c6e2-8d4b-4c7a-9e15-2b6d0c9a7f31/$?

Measure run time

Send a start signal before the work and a success or failure after it. Crony records the time between the two as the run's duration, shows it in the check's log and on the check, and returns it from the API as last_duration, in seconds.

curl -fsS -m 10 --retry 5 -o /dev/null https://staging.crony.sh/ping/f3a1c6e2-8d4b-4c7a-9e15-2b6d0c9a7f31/start
/usr/local/bin/backup.sh
curl -fsS -m 10 --retry 5 -o /dev/null https://staging.crony.sh/ping/f3a1c6e2-8d4b-4c7a-9e15-2b6d0c9a7f31/$?

A start signal also guards against a job that hangs. If no success or failure follows within the check's maximum run time, the check goes down. When no maximum run time is set, the grace time is used. See Schedules.

Run IDs

If a job can run again before the previous run has finished, add a run ID to each signal: any UUID, the same for the start and the end of one run. Crony then pairs each end with its own start, so durations stay correct when runs overlap.

RID=$(uuidgen)
curl -fsS -m 10 -o /dev/null "https://staging.crony.sh/ping/f3a1c6e2-8d4b-4c7a-9e15-2b6d0c9a7f31/start?rid=$RID"
/usr/local/bin/backup.sh
STATUS=$?
curl -fsS -m 10 -o /dev/null "https://staging.crony.sh/ping/f3a1c6e2-8d4b-4c7a-9e15-2b6d0c9a7f31/$STATUS?rid=$RID"

Without a run ID, a success or failure ends whichever run started last.

Paused checks

A start, success or failure signal resumes a paused check. If the check is set to resume only by hand, pings are logged as ignored until you resume it in the dashboard or through the API.