Send cron output to syslog
Send stdout and stderr to journald/syslog with a tag instead of mailing root
*/5 * * * * /opt/job.sh 2>&1 | /usr/bin/logger -t job
- tool
- cron8 commands
More cron commands
-
crontab - <<'EOF' MAILTO=ops@example.com PATH=/usr/local/bin:/usr/bin:/bin 0 3 * * * backup.sh EOFCron has a minimal PATH. Set PATH and MAILTO at the top, or jobs fail silently
-
run-parts --test /etc/cron.dailyList the scripts that would run, without running them. Handy for debugging cron.daily
-
systemd-run --on-calendar='*-*-* 03:00:00' --unit=backup /opt/backup.shA transient OnCalendar timer with logs in journald, instead of a crontab line. Note: it is gone after reboot
-
at now + 1 hour <<< 'systemctl restart nginx'Schedule one delayed command. See the queue with atq, cancel with atrm
-
batch <<< '/opt/heavy-reindex.sh'Runs only when the load average drops below 1.5. Note: atd must be running