Re: Cron Job Error Message
Posted in 1998
Avi Abrami wrote in message <34EBC427.8289C69C@telegate.co.il>... >Greetings all c.d.i.'ers! >Perhaps some kind person may be able to assist me? >I have a UNIX cron job that executes an UPDATE STATISTICS on my INFORMIX > >Universal Server database. Here is the crontab entry: > > 0 21 * * 0-4 /bin/tcsh /opt/users/avi/updstats.csh > >Here is the text of the shell script "updstats.csh": > > echo "update statistics" | /opt/users/informix/bin/dbaccess test - > >After execution of the cron job, I get the following UNIX mail message: > > From avi Wed Feb 18 21:00:07 1998 > Date: Wed, 18 Feb 1998 21:00:07 +0200 > From: avi (User account) > To: avi > Subject: Output from "cron" command > > Your "cron" job > > /bin/tcsh /opt/users/avi/updstats.csh > > produced the following output: > > Must be attached to terminal for 'am I' option > >I'm sure the UPDATE STATISTICS command executes successfully, but I was >wondering if there is some way to prevent generation of the above >"error" >message. > It looks like somebody has put the command "who am I" in your script. Look for that in the script. It could be replaced with "whoami" which still apparently needs to be run from a terminal, or address the problem as Paul mentions in his post. You might also need to delete the command entirely to eliminate the error message. Check to see if the script is doing something like MY_USER_ID=`who am I` . Good Luck! Tim Tim Schaefer tschaefe@mindspring.com http://www.inxutil.com ICQ:6358805 #include <manpages.h> >I am using IUS9.12.UC2 on a SUN Sparc 5 with SunOS 5.5.1 > >Any help will be greatly appreciated. > >Thanks In Advance, >Avi. > >************************************************************************ > /\\ \\ /| Avi Abrami, Analyst/Programmer, Telegate Ltd. > /__\\ \\ / | 7 Haplada Street, Or-Yehuda, ISRAEL >/ \\ \\/ | Phone:+972-3-5388717 Fax:+972-3-5335877 eMail:avia@telegate.co.il > > >