Pipe cron output to syslog cron
Tag stdout+stderr into journald/syslog instead of mailing root
*/5 * * * * /opt/job.sh 2>&1 | /usr/bin/logger -t job
more cron
all 8 commands →
MAILTO and PATH header
crontab - <<'EOF'
MAILTO=ops@example.com
PATH=/usr/local/bin:/usr/bin:/bin
0 3 * * * backup.sh
EOF
Test run-parts dry run
run-parts --test /etc/cron.daily
systemd timer alternative
systemd-run --on-calendar='*-*-* 03:00:00' --unit=backup /opt/backup.sh
One-shot job with at
at now + 1 hour <<< 'systemctl restart nginx'
Defer until load is low
batch <<< '/opt/heavy-reindex.sh'