Unix Programming - error only when run from cronjob

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2004 > error only when run from cronjob





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author error only when run from cronjob
Ryan Gaffuri

2004-01-23, 4:58 pm

I run the following code from cronjob and I get:

produced the following output:

/mnt/tfmdtwmna01/apps/util/monitor_databases: ORACLE_SID=bobaird: is
not an identifier

When i run it from a regular session its fine. I send it a setup file,
but for the life of me, I cant figure out what i need to change? I put
some echos in and the error is on the export ORACLE_SID=$TARGET;


TARGET=""
echo 1
cd $UTIL
for x in `ls *.myfile`; do
echo $x
TARGET=`echo $x | cut -d "." -f1`
HOST=`file_info -h $TARGET`
if [ `hostname` = "$HOST" ]; then
echo Target $TARGET
export ORACLE_SID="$TARGET";
echo 2
done
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com