Run IDs and run times

On this page

A run ID ties the start ping of one run to its finish, so the duration is right even when runs overlap. Generate any UUID per run, add it as rid to each ping of that run, and CronMissed does the rest.

How do I use a run ID?

shell
rid=$(cat /proc/sys/kernel/random/uuid)
curl -fsS "https://ping.cronmissed.com/5f0c1b2e-7a3d-4c8e-9b61-2d4f8a7e3c10/start?rid=$rid"
./job.sh
curl -fsS "https://ping.cronmissed.com/5f0c1b2e-7a3d-4c8e-9b61-2d4f8a7e3c10?rid=$rid"

The rid is a UUID in its usual text form, in either case; anything else answers 400. You may choose it at random or derive it from something stable, such as a date.

How is the run time measured?

  • The duration is the time between a start and the finish with the same rid, or the latest start when no rid is used. It is shown on the check page and in the ping log when the two are under 72 hours apart.
  • Only the most recently started run is watched. A finish with another run's rid still counts as a success for the check, and leaves the later run marked as started.

How are retries handled?

A start, success or failure that repeats the same rid and kind within 10 minutes is recorded once and answered 200. That absorbs the retries of curl --retry, and still works for a client that sends one fixed rid on every run, since the next run's start, or any signal after 10 minutes, is a new event. An Idempotency-Key header does the same for one request within 24 hours.

Try it on one job

Create a check, copy its ping URL into the job, and watch the first ping arrive.

Start monitoring