I have a problem with script scheduled in cron. In cron I have following line:33 09 * * 1-5 oracle /data1/backup/scripts-test/rman.sh > /data1/backup/log.txt 2> /data1/backup/log_err.txtAs you see I have to use oracle user to run rman script. RMAN.SH looks as follow:#!/bin/bashORACLE_HOME=/data1/app/oracle/product/12.1.0.2/db_1ORACLE_SID=eelxtestPATH=$ORACLE_HOME/bin:$PATHnow=$(date)logloc=/data1/backup/scripts-test/logrmanscript=/data1/backup/scripts-testjboss=/usr/JBossEAP/jboss-eap-6.4/binip=x.x.x.xServerGroup=EELX-Server-Group-Testlogfile=$logloc/$(date '+%Y-%m-%d')_log.txtecho ============================================ | tee -a $logfiledate | tee -a $logfileecho STEP1 closing JBoss Server Group | tee -a $logfile$jboss/jboss-cli.sh --controller=$ip --connect /server-group=$ServerGroup:stop-servers | tee -a $logfileecho STEP2 oracle backup. See rman log. | tee -a $logfile**$ORACLE_HOME/bin/rman msglog /data1/backup/scripts-test/log/$(date '+%Y-%m-%d')_rman.log cmdfile=$rmanscript/rman_backup.cmd**echo STEP3 starting jboss Server Group | tee -a $logfile$jboss/jboss-cli.sh --controller=$ip --connect /server-group=$ServerGroup:start-servers | tee -a $logfile]rman_backup.cmd is: connect target /shutdown immediate;startup mount;run{allocate channel ch1 device type disk;backup as compressed backupset full database format '/data1/extDirectories/xxx/yyy/oracle/test/%T_eelxtest_full_%u.bkp';backup format '/data1/extDirectories/xxx/yyy/oracle/test/%T_archivelog_eelxtest_%u.bkp' >>(archivelog all delete input);backup spfile;backup current controlfile format '/data1/extDirectories/xxx/yyy/oracle/test/%T_ora_ctl_file_eelxtest_%u.bkp';release channel ch1;}sql 'alter database open'As a result of job in cron  are following messages:Message file RMAN<lang>.msb not foundVerify that ORACLE_HOME is set properlySo I have verified ORACLE_HOME on both profiles oracle and root and it is in place in .bash_profile.Furthermore there is nothing mentioned in rman trace or log because rman didn't start at all.Please help.
Problem running rman in cron
rhel;cron;backup;oracle
Thomas,possible you must export the variable ORACLE_HOME, by;export ORACLE_HOMEafter declaration in script: rman.sh