Show another user's crontab
Check the jobs of a service account. Note: -u needs root or sudo
crontab -l -u <name> 2>/dev/null || echo 'no crontab'
- tool
- cron8 commands
More cron commands
-
( crontab -l 2>/dev/null; echo '@reboot /usr/local/bin/warmup.sh' ) | crontab -Add an @reboot job to the current crontab. Note: the network may not be ready at boot, use systemd if you need dependencies
-
*/5 * * * * /opt/job.sh 2>&1 | /usr/bin/logger -t jobSend stdout and stderr to journald/syslog with a tag instead of mailing root
-
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