this post was submitted on 10 Jul 2026
40 points (95.5% liked)

Programming

27640 readers
196 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
 

Had a backup script running via cron for months. Worked fine until it didn't โ€” turns out the disk filled up three weeks ago and the job started failing silently. Nobody noticed until we actually needed a restore.

The obvious answer is "check your logs" but let's be honest, nobody's reading cron logs daily for 15 different scheduled tasks across 4 servers.

What's your setup for making sure crons are actually completing? Do you just grep logs periodically, or do you have something more structured? Curious how others handle this without turning it into a whole project.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] oranki@nord.pub 2 points 14 hours ago

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/identifier to 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.