Ok, that's a little new for me. What I basically need to do is run a back up of some files on an internal network, then email myself saying everything went great. The files (databases) are on a PC and I'm going to back them up on my Mac. That's the rub. I was going to do it in Perl, because that's what I know, but is there another way?

Mark


On Apr 25, 2004, at 2:27 PM, Jerry LeVan wrote:


My daily.local file looks like:


/usr/bin/mail -s Crontab jerry <<DOC Cron ran at `date` `/usr/local/bin/dailyWakeup` DOC

No need for perl if you have Postfix set up :)
Cron runs the daily.local file if it exists
in periodic daily


I requeue a wakeup request for the next morning... see http://homepage.mac.com/levanj/Cocoa for a way to make sure your cron jobs get run on time.

Jerry

On Apr 25, 2004, at 5:16 PM, Bill Stephenson wrote:

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