I have added the following crontab job:
sudo crontab -e
58 * * * * ubuntu /home/ubuntu/backup/mysqlbackup.sh
>/home/ubuntu/backup/log/backup.log
I have tried both root and ubuntu users.
When I run the command:
sudo crontab -l
And when I run:
systemctl status cron
But mysqlbackup.sh is not executed. Any idea what is the problem or how can I diagnose what is going wrong?
Note I have added only minutes to test the script
2>&1
This will also redirect stderr to same log file. Then check log for errors. – LeonidMew May 21 '19 at 10:24journalctl -b | grep -i cron
– WinEunuuchs2Unix May 21 '19 at 10:37