Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: View Processes, Cron Privileges

_____/ On Thursday 25 August 2005 00:23, [Karel Kubat] wrote : \_____

> Roy Schestowitz wrote:
> 
>> I have a hard time setting up a job which periodically outputs usage
>> stats. I wish to be able to easily check stats remotely, so every 10
>> minutes the following gets executed:
>> top -b -n 1 >> ~/public_html/caption.txt
>> However, the cron job comes up with the following error:
>> "TERM environment variable not set."
> 
> Weird that top would need to know what TERM it's on.. but anyway, have you
> tried putting
>         TERM=vt100
> at the top of your crontab definition? That defines the TERM variable..
> obviously..
> 
> Hope this helps,

Thanks for the reply, Karel. After several days without a reply, I asked a
similar (not copied-and-pasted) question in the Mandrake NG and found a
solution:

before calling 'top -b -n 1 >> ~/public_html/caption.txt' I added the
following:

---
TERM=linux
export TERM
---

which appears to have done the trick. Declaring a TERM assignment alone
without 'export' seems to be insufficient.


Thanks again,

Roy

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index