schedule rman using cron job
I have scheduled a cron job to take rman backup of database everyday at 4PM. But I see that the empty backup.log file is getting generated while the script is not running. If I run the backup.sh script manually then the backup is running fine. The following are the scripts and the crontab details,
backup.sh script is as follows,
cd /u01/app/oracle/rmanbkp
rman target / <<EOF
run
*{*
allocate channel ch1 type disk format '/u01/app/oracle/rmanbkp/%d_%T_%s.bak';
backup database;
*}*
delete noprompt obsolete;
exit;
EOF
while the output of 'crontab -l' is
00 16 * * * /home/imsoracle/backup.sh > backup.log
Backup is not happening, what is wrong in my settings. Please advise.