in reply to RE: cronjobs and perl
in thread cronjobs and perl

hi jonathan, u see my script's purpose is to update the webpage automatically. it goes like this:
30 * * * * /usr/local/httpd/cgi-bin/admin/update.pl --exclusives
is there a way i can send an e-mail to myself to check if the script successfully ran? i know i am not a good sysadmin forgive me. thanks

Replies are listed 'Best First'.
RE: RE: RE: cronjobs and perl
by Zarathustra (Beadle) on Sep 19, 2000 at 10:41 UTC
    In your crontab:
    MAIL=jonathan

    ... or whatever local account name you have on that box.
RE: RE: RE: cronjobs and perl
by Jonathan (Curate) on Sep 19, 2000 at 15:32 UTC
    Forgive me if I'm being more stupid than usual today and have misunderstood.
    Do you want your script to E-mail you?
    If so, (watch the purists flame me ;-) I often just use the Unix mail or mailx command within backticks - quick and dirty but does the job. Though using Mail::Sendmail is a nice Perl only solution.
    However, if you want the cron line to mail you then I think it's possible but messy but IMHO there is no need for this. Don't worry about cron you can trust it. BTW if you are using a commercial ?nix then it is supported by the OS vendor.
    I've used it for ten years on most ?nix flavours and the only problems were of my own devising