[wplug] Crontab command parameters
William Powell
billpwl1 at attbi.com
Wed May 28 09:24:27 EDT 2003
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!
More information about the wplug
mailing list