Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Send message after server reboot

by scain (Curate)
on Mar 07, 2002 at 18:47 UTC ( [id://150087]=note: print w/replies, xml ) Need Help??


in reply to Send message after server reboot

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
Scott

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://150087]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-09-07 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.