Get best price on Unlocked International Phone w/Triple Cameras | ||||||||||||
|
||||||||||||
|
Perl: Site Monitormonitor.pl is a straightforward script that uses the LWP module and sendmail to routinely check if a site is running and to alert someone by email if it is not. This works great if you have an alpha-numeric cellphone or pager that receives messages via email. The script was written to monitor an internal NT site at work, and was scheduled to run every five minutes via a cron job on my Linux box. Requirements: The LWP module needs to be installed. This module comes with the libwww-perl package and can be downloaded at any CPAN site. Sendmail on a UNIX-type server is also required. Here is an example cron command you could use to schedule the script to
run every five minutes during working hours:
# min(0-59) hour(0-23) day(1-31) month(1-12) weekday(0-6) <command>
# run every minutes between 7am and 8pm Monday thru Friday */5 7-20 * * Mon-Fri perl /home/username/bin/monitor.pl Note: Once the site is not available, this script will keep alerting you until the site is available, which is why it is not scheduled to run on weekends or off hours. View and Download Script: monitor_pl.txt Related Links: CPAN LWP Module
|
privacy policy || © 1997-2016. astonishinc.com All Rights Reserved. |