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, 12:32 PM #21Fayez Zaheer
05-12-2004, 02: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.
05-12-2004, 03:01 PM #23
- Join Date
- Apr 2004
- North Hills, California
Actually, I was redirecting the output of date to test things.
For MAILTO=, does this go in the crontab itself. Is the syntax:
05-12-2004, 05:19 PM #24Actually, 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 $)
0 */4 * * * $HOME/SJP.pl
Your syntax is ok.
By Pachango in forum General DiscussionReplies: 25Last Post: 12-17-2008, 11:08 AM
By sunzon in forum E-mail / FTP ManagementReplies: 6Last Post: 05-10-2008, 08:07 AM
By nsc in forum CGI Scripts / PerlReplies: 6Last Post: 02-06-2007, 12:57 AM
By jalal in forum CGI Scripts / PerlReplies: 19Last Post: 11-03-2005, 11:02 AM
By j103c in forum E-mail / FTP ManagementReplies: 54Last Post: 06-10-2004, 04:35 PM