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.

  • mbirth 🇬🇧@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    18 hours ago

    Do you know about the MAILTO= lines in crontabs? That’s exactly what they’re there for. (And your script needs to output error messages on failure, of course.) You’ll need a local mail forwarder like ssmtp or exa, though.