Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to run Shell script with Cron

841964Apr 27 2011 — edited Apr 28 2011
Hi,

I am facing problem with my cron. I've one shell script where in I am generating one xml file through pl/sql script. After generating the file transferring that file to the another server. As this is daily interface so I intend to use cron feature. But cron is not at all generating file or not even executing that some times.
My shell script is working fine when I ran from prompt.

Here is my shell program script
output=`sqlplus -s /nolog <<-EOT
   set pages 0 feed off
   whenever sqlerror exit failure;
   connect xgbzprod/xgbzprod
   exec GL_COA_XMLTAG_PROC;
   `
echo $output
cd  /u01/oratest/gebiz_processed
for fn in GEBIZ_COA_RPO000*.*; do
ftp -v -n 10.60.18.111<< EOF
user test test123
lcd /u01/oratest/gebiz_processed
cd /u01/appltest/XMLFI/RPO000/uat/inbox
bin
put $fn
bye
EOF
mv $fn /u01/oratest/gebiz_outbound
done
This one is absolutely working fine and manaully when I ran that I can find my files on another server. But with cron job it is not working.

Here is my cron script
#30 12 * * * /u01/oratest/gebiz_processed/XGBZ_GL_SEG_FTP.sh  > /u01/oratest/gebiz_processed/XGBZ_GL_SEG_FTP.log
Please help me where exactly I am doing wrong in this process.


Regards
Nagendra
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2011
Added on Apr 27 2011
6 comments
1,530 views