Use case

Add jitter to a cron schedule

Cron cannot jitter: an expression like 0 3 * * * fires every machine, customer, and retry at exactly 03:00, synchronizing load into thundering herds, cache stampedes, and rate-limit collisions. The usual fix is a hand-rolled 'sleep $((RANDOM % 3600))' at the top of the job. Untimely replaces that with a scheduled window: the Webhook trigger itself lands at a different time inside 02:00–04:00 UTC each night.

Why exact cron times hurt

Everything scheduled 'on the hour' arrives together: your jobs, everyone else's jobs, and the retries of whatever just failed. Upstream APIs see synchronized bursts, caches expire in unison, and one bad minute takes out a day of runs.

Window instead of sleep

A random window moves the jitter out of your job and into the scheduler. The job stays simple, the wake time varies, and the run history shows the actual trigger time of every run — something a sleep call hides from you.

Keeping determinism where you need it

Some jobs genuinely need exact times (billing cutoffs, SLA reports). Untimely's deterministic schedule type covers those; use random windows for the rest.

Try it

Create it with one API call (create an API key in dashboard settings first):

curl -sS "https://untimely.app/api/events" \
  -H "authorization: Bearer $UNTIMELY_API_KEY" \
  -H "content-type: application/json" \
  -H "idempotency-key: nightly-maintenance-jitter-001" \
  -d '{
    "name": "Nightly maintenance with jitter",
    "interval": 1,
    "frequency": 1,
    "betweenTimeStart": "02:00",
    "betweenTimeEnd": "04:00",
    "actionType": "WEBHOOK",
    "webhook": {
      "method": "POST",
      "url": "https://example.com/jobs/nightly-maintenance"
    }
  }'

FAQ

Questions about this use case

What granularity is the jitter?

The trigger time is chosen inside your window; make the window as wide or narrow as your tolerance allows — from minutes to the whole day.

Can I jitter multiple runs per day?

Yes — frequency up to 5 triggers per interval, each independently placed in the window.

What about jobs that must not overlap?

Untimely schedules and delivers the trigger; concurrency control belongs in your job. Widen the window to reduce collision odds.