this post was submitted on 10 Jul 2026
30 points (94.1% liked)
Programming
27656 readers
123 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Put the job in a script that only outputs text on error, and use MAILTO, like many have said. Due to spam filters that might not be an option though.
Next option is ntfy or gotify. make sure the script exits with nonzero status on error, and append
|| curl -XPOST -d 'cronjob failed' 'https://ntfy.sh/your-random-topic'to the crontab line. Naturally you'll likely want the ntfy/gotify mobile app to receive the notodication. On iOS this might suck, as at least for me the ntfy app didn't update in the background at all.Next one is an push uptime monitor, self-hosted or managed. I like Uptime Kuma. Make sure the script only exits with 0 status on success, and append
&& curl 'https://your-monitor-endpoint/identifierto the crontab line. Or use an inverted monitor and use||instead of&&.The uptime monitor will then notify you if the script hasn't succeeded in the defined interval.
With some combination of these you can be pretty confident you'll notice a failure, but still better to check every once in a while.
I also have a lot of jobs around that notify for each run, despite success or error, but it's a bit too easy to just glance the message and accidentally ignore an error.