deadcron (Python)
A local dead-man's-switch for cron jobs. Cron never tells you when a job
stops running — the backup that silently hasn't fired in three days, the sync
that's been crashing since Tuesday. deadcron notices the silence and alerts
you. Zero dependencies (pure stdlib), no server to host.
There's also an identical npm version (
npx deadcron). Both share the same~/.deadcronstate format.
pip install deadcron
# Replace your crontab command with a wrapped version:
*/30 * * * * deadcron run backup --every 1h -- /usr/local/bin/backup.sh
# Then let the watcher check for silence:
deadcron install --every 5m
Why
"Cron jobs do not tell you when they fail. That is the core issue."
The classic incident: a database backup script dies at 2 a.m., keeps "running"
in cron's eyes, and nobody finds out until the day you actually need the backup.
Hosted monitors (healthchecks.io, Cronitor, Dead Man's Snitch) solve this — but
they need an account and send your job metadata to a third party. deadcron
runs entirely on your machine: a small state file plus a watcher you schedule
yourself.
How it works
- Each run checks in — wrap the command with
run(pings on exit 0, records the exit code on failure) or callping <name>at the end of your job. - A job declares its expected period with
--every(+ optional--grace). If the time since the last successful check-in exceedsevery + grace, the job is overdue. - The watcher runs
checkon its own schedule (added to cron once viainstall) and fires every alert channel you've enabled.
Tracking a job
# Recommended: wrap the command.
deadcron run backup --every 1d --grace 1h -- /opt/backup.sh
# Or ping manually at the end of a script:
deadcron register backup --every 1d --grace 1h
deadcron ping backup
deadcron status
# ● backup ok every 1d last: 3h ago
# ● sync OVERDUE by 2h every 1h last: 3h ago
The watcher
deadcron check # exit 1 if anything is overdue/failed
deadcron check --json
deadcron install --every 5m # add `check` to crontab (idempotent)
deadcron uninstall
check throttles repeat alerts (default: at most once per hour per job).
Alert channels
check fires every enabled channel at once. Terminal is on by default.
deadcron config show
deadcron config enable macos
deadcron config set-webhook https://hooks.slack.com/services/XXX
deadcron config set-email --to ops@you.com --sendmail
deadcron config set-email --to ops@you.com --from cron@you.com \
--smtp-host smtp.gmail.com --smtp-port 465 \
--smtp-user me@gmail.com --smtp-pass "app-password"
deadcron config test # send a sample alert through all of them
| Channel | How |
|---|---|
| terminal | writes the alert to stderr |
| macOS | native banner via osascript |
| webhook | POST JSON {event, checkedAt, jobs} |
local sendmail, or direct SMTP (smtplib, TLS 465 or STARTTLS) |
Managing jobs
deadcron pause <name> # maintenance window
deadcron resume <name>
deadcron fail <name> # mark last run as failed
deadcron rm <name>
Storage
Plain JSON under ~/.deadcron/ (override with $DEADCRON_HOME). Nothing leaves
your machine unless you configure a webhook or email channel.
Exit codes
0 healthy · 1 one or more jobs overdue/failed · 2 error.
Duration format
30s · 5m · 2h · 1d · 1w (a bare number means seconds).
License
MIT
Metadata
Release files for deadcron 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deadcron-0.1.0.tar.gz | 16.6 kB | Without provenance | Details for deadcron-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deadcron-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for deadcron-0.1.0-py3-none-any.whl |
Total release size: 30.8 kB
Release files / deadcron-0.1.0.tar.gz
| Download URL | deadcron-0.1.0.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1afde6220304db9fc70025c9089de68cda1446f9b43ebf953ef7e5d94cfeca7
|
|
BLAKE2b-256 checksum How to use checksums |
9cd1461eebecaf8bcc210960c7774bcc54cf51019b6103632d3113246b55fa6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.7
|
Release files / deadcron-0.1.0-py3-none-any.whl
| Download URL | deadcron-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
433cdf9894b2a473089ea57764ffea3a34b5e297fff6b33c582db0ad3357f1a8
|
|
BLAKE2b-256 checksum How to use checksums |
4d6eb6a7f490790dcb4a24a7cd20a096b75cf53658e138707ad50d4bf6bb6236
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.7
|
Security for deadcron 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.