in reply to reading of log files

Well, if it is unix, you don't have to worry about it if you are running it with cron.

The cron daemon generally runs you script and emails any output to you.

First, you need to tell crond about your script. You'd do something like this in /etc/cron.d/backup (you don't have to call it backup -- that is just the filename I chose):

MAILTO="whereever you want to email any output to" # the format goes minute hour day month day_of_week # this will run the backup script as root ever day at # 4:23 in the morning 23 4 * * * root /path/to/backup/script.pl
Now, in your script, print any errors to STDERR, and die if you have to. This will be mailed to you.

cheers.

Replies are listed 'Best First'.
Re: Re: reading of log files
by AidanLee (Chaplain) on May 07, 2001 at 21:30 UTC

    If you'd rather avoid depending on an outside tool for more than scheduling (I wouldn't reccommend writing a scheduler, most OSes have one), You could look into Mail::Sender for sending out emails. Benefits:

    -Doesn't require a particular scheduler/ OS, or mail program
    -You can specify multiple email addresses, or specify a different address depending on the messages that need sending

    Or this may just be overkill.