[wplug] Crontab command parameters
Mike Griffin
mike at dmrnetworks.com
Fri May 30 10:22:01 EDT 2003
I messed that up, it should be:
TERM=dumb
SHELL=/bin/sh
MAILTO=""
On Friday, May 30, 2003, at 09:48 AM, Mike Griffin wrote:
> If you have /bin/mail installed, construct the crontab like this:
>
> TERM=/bin/sh
> MAILTO=""
>
> 0-59/15 0-23/1 * * * /usr/bin/top -n 1 | /bin/mail -s "top output" bill
>
>
> Mike
>
> On Wednesday, May 28, 2003, at 09:24 AM, 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
>>
>> --
>> Linux: It's the way to go!
>>
>>
>> _______________________________________________
>> wplug mailing list
>> wplug at wplug.org
>> http://www.wplug.org/mailman/listinfo/wplug
>>
>>
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
>
More information about the wplug
mailing list