This question already has an answer here:
My bash file is not executed by cronjob created as root. The cronjob setup looks as it follows
0 0 * * * mysql_backup.sh
does need to be decalared with the bash command
0 0 * * * bash mysql_backup.sh ? if I execute manually my bash script manually
sudo bash mysql_backup.sh than it's working.
I have been creating the cronjob using
sudo crontab u root -e and the bash file is in the root of centos