Think about Loose Coupling | |
PerlMonks |
Re: Send message after server rebootby scain (Curate) |
on Mar 07, 2002 at 18:47 UTC ( [id://150087]=note: print w/replies, xml ) | Need Help?? |
Well, there are a couple of things you could do. You can talk
the sysadmin of the box into putting a script in the startup
routine to send an email, or you can do what you suggested and run a cron job and have it send an email. Either way, look
into Mail::Sendmail.
As for system commands, a simple command like w or uptime will report uptime. You could get the outout with backticks and parse out the uptime. If it is less than a day, send you the email.
Good luck
In Section
Seekers of Perl Wisdom
|
|