I am trying to set up a crontab job to back up a mysql DB every day at a specific time. I do the following steps (as root):
crontab -e
00 11 * * * root /root/my_Backups/productionbDB-backup.sh >> mybackup.log 2>&1
service crond restart
I waited to be 11 am, but nothing happened.
I confirmed that if the command /root/my_Backups/productionbDB-backup.sh
is issued from the command line, as root, it creates the backup.
What am I missing?
00 11 * * * root /root/my_Backups/productionbDB-backup.sh >> mybackup.log 2>&1
-> what is the root
word doing there? What you should have is 00 11 * * * /root/my_Backups/productionbDB-backup.sh >> mybackup.log 2>&1