Monitor Billing Cron Jobs, Renewals, Emails, and Reports
A renewal job can exit 0 having charged nobody. The outcomes, expectations, and deadlines to monitor for billing, email, report, export, and deletion jobs, plus reconciliation and routing.
25 articles
A renewal job can exit 0 having charged nobody. The outcomes, expectations, and deadlines to monitor for billing, email, report, export, and deletion jobs, plus reconciliation and routing.
Certbot runs twice a day and usually does nothing, so a broken renewal can hide for weeks. The schedules, failure modes, hooks, tests, and a check-in that reports every run.
A grace period trades false alarms for detection time. Size it from measured run times and start delays, choose between start and completion check-ins, and see three worked examples.
Alert on missed, failed, stuck, and bad-outcome runs, route by criticality and environment, name an owner per job, and cut the per-retry alerts, tight grace periods, and cron mail behind fatigue.
A nightly job that creeps from 10 minutes to 3 hours fails no check until it collides with the next run. Measure every run, read the trend in percentiles, and alert on the creep early.
Retries fix transient failures and can hide real ones. Choose what to retry, cap attempts and time, use Kubernetes and systemd retry settings correctly, and keep the final failure visible.
Every job at 00:00 on every host makes one big spike. Spread the load with deliberate minutes, per-host offsets, random sleeps, cronie RANDOM_DELAY, systemd RandomizedDelaySec, and Jenkins H.
Cron checks the crontab file, not what it runs. Run jobs unprivileged, find root jobs that other accounts can modify, keep secrets out of crontab lines, and audit cron for persistence.
Which shell /bin/sh really is, where set -e quietly stops applying, exit code conventions, EXIT and TERM traps, logs that survive logrotate, and a complete template with check-ins.
Hand-edited crontabs have no history, no review, and vanish when a server is rebuilt. Put them in git, deploy whole files, lint them in CI, and catch edits made on the server.
Copy a crontab to three servers and the job runs three times; keep it on one and it stops when that server does. Six architectures compared on single runs, failover, and cost.
Most ETL failures exit 0: zero rows, a half-loaded window, duplicates from a retry, a stale source. What to measure on every run, how to reconcile it, and why freshness needs its own check.
DisableConcurrentExecution makes a second run wait while holding a worker, then fail and retry. What it locks on each storage, how to skip a run instead, and when a one-worker queue fits.
Schedulers retry, overlap, and catch up, so some runs happen twice. Working SQL and Python that turn the second run into a no-op: period claims, watermarks, upserts, idempotency keys, and an outbox.
A backup that exits 0 can still be empty, missing off-site, or impossible to restore. A pg_dump script that checks its own output, a weekly restore drill, and alerts on the numbers.
An LLM job can exit 0 after a refusal, a max_tokens cutoff, or a quiet model change. Count what each run produced, score a small eval, and alert on those numbers, not only the exit code.
Cron starts a new run whether or not the last one finished. Choose a policy, use flock correctly, see why PID files fail and what Forbid really does, and lock across hosts.
With RAMJobStore, every Quartz.NET instance runs every job. How a clustered AdoJobStore gives each firing to one node, recovers a dead node, and the misconfigurations that break it.
Scheduled-job code from a coding assistant can look right and still run at the wrong time, twice, or never. Thirteen patterns to check in review, each with the rule and the fix.
Read-only commands that list scheduled work on Linux, Windows, macOS, Kubernetes, clouds, CI, frameworks, and databases, a fleet script that writes one CSV, and a diff against your monitors.
Cron mails job output or drops it. Send it to a file, journald, or stdout, give every run JSON start and end lines that share a run ID, rotate the logs, and link each run to its log search.
Whoever gets the alert should be able to fix the job without you. A runbook template for scheduled jobs, a filled-in nightly export, and a rerun script that takes the lock and checks in.
Zero rows imported, an empty export, an API that answered 200 with no data. Where silent success comes from, the in-job checks that catch it, and outcome checks that alert on the numbers.
Preview next runs with a parser that reads the schedule the way your scheduler does, reproduce cron's user and environment, start a real run without waiting, and test the logic with a fixed clock.
Eight checks that keep scheduled automation from failing quietly: exit codes, idempotency, overlap locks, timeouts, bounded retries, result checks, missed-run detection, and tested alerts.