how to run sqlldr script by crontab
the code below working fine when i run by ./listcdr.sh but when i try to run it by crontab the sqlldr part not working only the move part its working ,
cd /med/cdrs/swh
ls Wi* > /u01/ctrlfile/test.txt
cd /u01/ctrlfile
sqlldr ubai/ubai control="/u01/ctrlfile/loadCDRNames.ctl" log="/u01/ctrlfile/loadCDRNames.log"
#done
for i in `cat /u01/ctrlfile/test.txt`; do
if [ -s /u01/ctrlfile/est.bad ]
then
echo "Error in uploading file $i"
else
mv /med/cdrs/swh/$i /med/cdrs/new ;
# echo "File $i was uploaded successfully."
fi
done
any help please ,