Front page | perl.beginners |
Postings from March 2002
time limit???
Thread Previous
From:
Alberto Santana
Date:
March 29, 2002 09:19
Subject:
time limit???
Message ID:
3CA49E32.95A343D@qtp.ufl.edu
Hi guys,
Suppose I have a Perl (called from a crontab file) script that will
(basically) do something like
this:
$out=`lynx -dump http://lists.cpan.org/showlist.cgi?name=beginners`;
open(OUT,">out");
print OUT $out;
close(OUT);
$send_it=`mail me\@here.com<out`;
OK, here comes the problem. What if the web page is down? lynx will
keep trying for a while until it gives up or something.
Is it possible to impose a time limit, like: execute $out, wait for
45 seconds, if there was no response (lynx did not dump), exit(0);
cheers,
A
--
Powered by SuSE Linux 7.1 (http://www.suse.com)
Thread Previous