crontab -e
: then add a line representing the job
- @reboot sleep 60 && my_script.sh
- 59 12 * * * simon /usr/bin/sample.sh > /dev/null 2>&1
silent failures
: running a job with no permission for the current user fails silently, be careful to provide sudo when needed
- Either
sudo systemctl status crond
orsudo systemctl status cron.service
: Show recent systemd logs - Either
journalctl --unit crond -n all
orjournalctl --unit cron -n all
: Show all systemd logs Other ways journalctl _COMM=cron
cat /var/log/syslog | grep crontab
On some systems the logs are stored in/var/log/cron
cat /var/log/cron