[wplug] Crontab command parameters

billings at negate.org billings at negate.org
Wed May 28 09:55:00 EDT 2003


'tcgetattr' is a function for modifying a tty.  Since it's running from
a cronjob, it must be complaining because it is being run without a
terminal to connect to.

You'd probably just use 'ps'.

On Wed, 2003-05-28 at 09:24, William Powell wrote:
> I am trying to pass parameters to a command in my crontab file, but they 
> seem to be ignored or  misunderstood.
> 
> I am trying to learn why this machine is locking up.  I wanted to mail 
> myself a single iteration of the output from the "top" command.
> 
> Here is a copy of my crontab file:
> 
> MAILTO=bill
> 0-59/15 0-23/1 * * * top n1
> 
> 
> Here is a copy of the mail I receive based on the above crontab file:
> 
>  From bill  Wed May 28 08:55:01 2003
> Date: Wed, 28 May 2003 08:55:00 -0400
> From: root (Cron Daemon)
> To: bill
> Subject: Cron <bill> top n1
> X-Cron-Env: <MAILTO=bill>
> X-Cron-Env: <SHELL=/bin/sh>
> X-Cron-Env: <HOME=/home/bill>
> X-Cron-Env: <PATH=/usr/bin:/bin>
> X-Cron-Env: <LOGNAME=bill>
> 
> top: tcgetattr() failed: Invalid argument
> 
> 
> I am trying to achieve the same functionality in the crontab item that I 
> get from the following command:
> 
> top n1 | mail -s "system status" bill
> 
> 
> I suspect the problem is in how I need to be quoting the command string 
> in the crontab, but  several different attempts have  failed to change 
> the results.
> 
> Thanks,
> Bill
-- 
Jonathan S Billings <billings at negate.org>
TSFNKP



More information about the wplug mailing list