_____/ On Wednesday 24 August 2005 06:35, [Kenneth] wrote : \_____
> Roy Schestowitz wrote:
>> I am trying to access usage stats remotely, so every 10 minutes the
>> following gets executed:
>> top -b -n 1 >> ~/public_html/caption.txt
>> The cron job comes up with the following error:
>> "TERM environment variable not set."
>> When I run the command as myself, there appears to be no problem. Any
> Cron has its own set of environment variables, and they aren't likely to
> be the same as you have when you type the command. I don't have time to
> test this so no guarantees but you could try something like
> TERM=dumb; top -b -n 1 >> ~/public_html/caption.txt
> for your cron command. Or you could make a little script to run from
> cron, and set up any environment you need.
Thanks Kenneth. I tried your suggestion, but still got the same error