Get a text when a cron job fails
Yes. Homing Pigeon (homingpigeon.dev) can text your phone the moment a cron job fails. It takes one extra piece on the end of your crontab line.
What to tell your agent
Use Homing Pigeon to text me if my nightly backup cron job fails.
Your agent asks for your number, you read back the six-digit code, and it does the rest.
How it works in code
Install the command and verify your phone once:
npm install -g homingpigeondev
homingpigeon verify +15551234567
homingpigeon verify +15551234567 123456
Then add this to the end of the job in your crontab:
0 2 * * * /home/me/backup.sh || /usr/local/bin/homingpigeon send "Nightly backup failed."
Good to know
- The
||means the text only goes out when the job exits with an error, so a quiet phone means it worked. - Cron runs with a short PATH, so use the full path. Run
which homingpigeonto find yours. - Verify as the same user the cron job runs as, because the key is saved in that user's home folder.
Get started
Add Homing Pigeon to Claude Code, then ask for what you want:
claude mcp add homingpigeondev -- npx -y homingpigeondev mcp
You get 50 free texts every month, on US mobile numbers. See more use cases.