Shell scripts for monitoring cron jobs with DeadManPing on Linux/Unix systems.
- Replace
YOUR_MONITOR_IDin each script with your actual monitor ID from deadmanping.com - Make script executable:
chmod +x script.sh - Add to crontab:
0 3 * * * /path/to/script.sh
- detect-empty-backup-file-cron.sh - Detect when backup files are empty
- verify-cron-job-actually-ran.sh - Verify job execution with start/end pings
- verify-cron-job-completed.sh - Confirm job finished successfully
- cron-job-exit-code-not-zero.sh - Check exit codes
- cron-job-exit-status-check.sh - Verify exit status
- detect-cron-job-wrong-exit-code.sh - Detect false success
- silent-cron-failures.sh - Detect silent failures with trap
- cron-job-silent-failure-detection.sh - Always ping on success
- detect-empty-backup-file.sh - Check backup file size
- detect-backup-file-missing.sh - Verify backup file exists
- backup-file-zero-bytes.sh - Detect zero-byte backups
- verify-backup-file-size.sh - Validate file size ranges
- curl-success-but-wrong-response.sh - Validate API responses
- curl-returns-200-but-wrong-data.sh - Check response body content
- verify-cron-output.sh - Validate script output
- verify-script-output-content.sh - Check output content
- detect-cron-job-partial-failure.sh - Verify multi-step jobs
- cron-job-returns-success-but-fails.sh - Validate results
- cron-job-not-executing.sh - Detect non-execution
- detect-cron-job-skipped.sh - Catch skipped jobs
- Always use
set -e- Exit immediately on error - Use
set -o pipefail- Catch failures in pipes - Ping inside script - Not in cron line, so you have access to variables
- Check results - Don't just trust exit codes, verify actual results
- Use traps - Ensure ping is sent even on unexpected exit
See deadmanping.com for detailed documentation on each problem and solution.