Just curious, did you run the crontab command? I know I sometimes just forget the simple stuff...

Kindest Regards,

Bill Stephenson

On Apr 25, 2004, at 4:28 AM, Mark Wheeler wrote:

Hi,

I just installed 10.3 and am trying to get a cron job to fire off a perl script which will send an email saying the cron job was completed.

crontab listing

* * * * * /Users/blah/Library/Scripts/test.pl

Here is the script:

test.pl
------------------------------------------------
#!/usr/bin/perl -w

use strict;

my $from = '[EMAIL PROTECTED]';
my $to = '[EMAIL PROTECTED]';
my $body = "Success.";

open (SENDMAIL, "| mail -t");

print SENDMAIL "Subject: Backup Email Test\n";
print SENDMAIL "From: $from\n";
print SENDMAIL "To: $to\n\n";
print SENDMAIL $body;
close (SENDMAIL);

exit;
--------------------------------------------------

I have enabled Postfix to be running and have sent and received an email from the command line. I've also executed the script run from the command line. But the script doesn't seem to be sending an email. Do I need to get perl set to run in a settings file? I thought that I only needed to mess with settings files if I was going to use the web server. A little help would be appreciated.

Thanks,

Mark




Reply via email to