Xref: utzoo comp.unix.misc:340 comp.unix.xenix.sco:493 comp.unix.internals:678 comp.unix.sysv386:1264 comp.unix.shell:599 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!mips!smsc.sony.com!tin From: tin@smsc.sony.com (Tin Le) Newsgroups: comp.unix.misc,comp.unix.xenix.sco,comp.unix.internals,comp.unix.sysv386,comp.unix.shell Subject: Re: crontab for ordinary users Message-ID: <1990Oct16.191021.21473@smsc.sony.com> Date: 16 Oct 90 19:10:21 GMT References: <1990Oct15.181918.8325@cubmol.bio.columbia.edu> Organization: Sony Microsystems Corp, San Jose, CA Lines: 57 In article <1990Oct15.181918.8325@cubmol.bio.columbia.edu> ping@cubmol.bio.columbia.edu (Shiping Zhang) writes: >In order to test if crontab works for, I prepared the follow >script file called test which is chmoded excusable > >#!/usr/bin/csh ># the script file >echo test crontab > >and created the crontab file with a single line in the format: > >min h * * * /wholepath/test > >The script is invoked at specified time but aborted at very begining. >I got the following message from the system: > >Subject: Output from "cron" command >Status: R > >Your "cron" job > >/wholepath/test > >produced the following output: > >TERM: Undefined variable. > > >I tried the following: >min h * * * export TERM; /wholepath/test >min h * * * set TERM; export TERM; /wholepath/test >min h * * * set TERM termname; export TERM; /wholepath/test >etc... >But non of them worked. >However, if it was invoked in the root crontab, it worked fine. >Can anyone point out to me what is the problem? >Thanks. > >-ping This is because cron is executing your command (shell script or not) under your uid. It will do something similar to 'su - your_uid' to also pick up your environment definitions and then execute your command(s). I'd check your .cshrc/.login (if you are using csh) or .profile (if sh). When cron is executing something like this, there is no controlling terminal. Something in your .cshrc/.login/.profile is doing I/O to the terminal and I think that is what cron is complaining about. Check for echo's, read's, etc. -- Tin -- .---------------------------------------------------------------------- . Tin Le Work Internet: tin@smsc.Sony.COM . Sony Microsystems UUCP: {uunet,mips}!sonyusa!tin . Work: (408) 944-4157 Home Internet: tin@szebra.UUCP