Glad you worked it out. I don't think cron runs with the same privileges as we do when we log on via SSH, which explains the home directory differences. You can actually change your home directory via your .bashrc - I've done that already and changed it to /.
Results 21 to 24 of 24
Thread: Installing a Crontab
-
05-12-2004, 11:32 AM #21
Fayez Zaheer
-
05-12-2004, 01:18 PM #22
Well I'm glad you figured it out. Apparently if the cron script is missing the MAILTO keyword then any output is automatically mailed to the owner. That should have been obvious before I opened my big e-mouth :roll: Afterall, how else could you have determined if /bin/date worked? If the MAILTO keyword is present, but not set to anthing then all output is suppressed. In my case the perl script accesses the e-mail on it's own and I don't need to receive an e-mail message telling me the Perl program died, because the mail box was empty. So I have it set like this: MAILTO="" . Alternatively I suppose you could redirect the output anywhere, but I haven't tried.
SJP
-
05-12-2004, 02:01 PM #23Member
- Join Date
- Apr 2004
- Location
- North Hills, California
- Posts
- 63
Actually, I was redirecting the output of date to test things.
For MAILTO=, does this go in the crontab itself. Is the syntax:
MAILTO=user@domainH: faigin -at cahighways -dot org
Learn about Judaism: http://www.mljewish.org, http://www.scjfaq.org
Drive California Highways: http://www.cahighways.org
Play more boardgames: http://www.boardgamegeek.com
-
05-12-2004, 04:19 PM #24
Ok, but I think I had this problem when I began and consulted the man pages to learn how to turn it off. Yes, put it in your crontab. Here's mine:Actually, I was redirecting the output of date to test things.
west38:~$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.23049 installed on Thu Jun 26 10:21:10 2003)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
MAILTO=""
0 */4 * * * $HOME/SJP.pl
Your syntax is ok.
SJP
Similar Threads
-
HowTo Guide: Installing Subversion
By Pachango in forum General DiscussionReplies: 25Last Post: 12-17-2008, 10:08 AM -
HowTo Tutorial: Using and Installing SSH
By sunzon in forum E-mail / FTP ManagementReplies: 6Last Post: 05-10-2008, 07:07 AM -
Howto guide: Installing Mailman
By nsc in forum CGI Scripts / PerlReplies: 6Last Post: 02-05-2007, 11:57 PM -
Installing Perl modules with CPAN
By jalal in forum CGI Scripts / PerlReplies: 19Last Post: 11-03-2005, 10:02 AM -
Upgrade SpamAssassin using CPAN?
By j103c in forum E-mail / FTP ManagementReplies: 54Last Post: 06-10-2004, 03:35 PM
Reply With Quote