Re: Cron Job Error Message
Posted in 1998
Topics: Server Administration
I 've run into a similarly mysterious message myself. The real answer is that when running csh scripts as cron jobs, your ~/.cshrc file is read by csh before executing the script. Thus, the who am i command is probably in your ~/.cshrc and is printing an error message because there is no terminal. Jeff Larsen larsen@qec.com On Thu, 19 Feb 1998 07:33:28 +0200, Avi Abrami <avia@telegate.co.il> wrote: >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. > >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 > > >