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
This is incorrect format.
The format is described in the crontab file:
ubuntu
is not a command. Remove it, so the line reads:Systemwide crontab, specified in
/etc/crontab
has the user field: