CronWarden

Run duration

If your job calls the /start endpoint when it begins and the success endpoint when it finishes, CronWarden measures how long each run took. Duration often reveals problems that a plain success can't: a backup that finishes in two seconds didn't back up much, and a job creeping steadily toward its time limit is about to start failing.

Measuring a run

Bracket the work with a start and a success check-in:

curl -fsS https://cronwarden.com/ping/your-ping-key/start
# ... job runs ...
curl -fsS https://cronwarden.com/ping/your-ping-key

The time between the two is recorded as the run's duration and charted on the monitor's detail page. Without a /start, the run still counts as a successful check-in — you just don't get a duration for it.

The checks you can set

Like value checks, duration checks are opt-in:

  • Minimum duration — flag a successful run that finishes faster than it plausibly could have. A run under the minimum raises a warning and degrades the monitor, because "instant success" usually means the job did nothing.
  • Duration drift — flag a run whose duration strays more than a set percentage from the trailing average of recent runs. This catches a job that's slowing down over time, and it starts applying once the monitor has enough completed runs to have an average.

Both are thresholds you choose. CronWarden compares against the monitor's own recent history — it doesn't guess what "normal" is for you.

A run that starts but never finishes

Because CronWarden saw the /start, it knows a run is in progress. If the matching success never arrives, that's caught by the monitor's normal late-and-down handling — see Grace periods & states.