Cron & Task Scheduling (Cron/Systemd Timers/At)
Stop letting cron emails bury your inbox in junk
🧩 The Challenge
You finally fixed that backup script, but now your inbox is flooded with useless cron output every five minutes. Nobody needs a thousand emails just to confirm a job didn’t output anything.
💡 The Fix
Just point the stdout and stderr for each cron job to /dev/null if you only care when things actually break. You’ll save your sanity and stop the email alerts from hitting your quota.
* * * * * /usr/local/bin/backup.sh > /dev/null 2>&1
⚙️ Why It Works
Redirecting the standard output and error streams into the bit bucket keeps the cron daemon from thinking it needs to mail you the results. But if you want to keep the error logs, just redirect stdout to null and keep stderr pointing to a file.
🚀 Pro-Tip: Use logger -t jobname if you want to shove that output into syslog instead of a random file.
Linux Tips & Tricks | © ngelinux.com | 9/4/2026
