create a script in /etc/cron.daily . Do remember that the script should not have any suffix otherwise the cron job will not pick it up. I made a mistake of naming the file mysqlbackup.sh and later discovered that the cron job was not executing this script. I had to rename it to mysqlbackup (no .sh suffix)