develooper Front page | perl.beginners | Postings from March 2002

RE: time limit???

Thread Previous | Thread Next
From:
Nikola Janceski
Date:
March 29, 2002 09:56
Subject:
RE: time limit???
Message ID:
1449413DA482D311B67000508B5A12F50592DFA5@nyexchange01.summithq.com
You might want to see the options for lynx. I am sure you can set the
timeout and retry times in some command line option. (Sorry can't tell you
the option, don't have lynx, very closed down system).

> -----Original Message-----
> From: Alberto Santana [mailto:santana@qtp.ufl.edu]
> Sent: Friday, March 29, 2002 12:51 PM
> To: beginners@perl.org
> Subject: time limit???
> 
> 
> Hi guys,
> 
> Suppose I have a Perl script (called from a crontab file) 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); 
> 
> I'll appreciate your help.
> cheers, 
> A 
> -- 
>                                                          BEST WISHES,
>                                                          Alberto     
>                                                                      
>           MMM           \|/            www            __^__          
>          (o o)          @ @           (O-O)          /(o o)\         
> +-----ooO-(_)-Ooo---oOO-(_)-OOo---oOO--(_)--OOo---oOO==(_)==OOo-----+
> | Alberto Santana                                                   |
> | Ph.D. Student                          Email: santana@qtp.ufl.edu |
> | University of Florida                  Phone: (352) 392-3010      |
> | Quantum Theory Project                 Home: (352) 379-9938       |
> | 2301 NPB # 92, P.O. Box 118435         Fax: (352) 392-8722        |
> | Gainesville, Fl 32611-8435        http://www.qtp.ufl.edu/~santana |
> +-------------------------------------------------------------------+
> Powered by SuSE Linux 7.1 (http://www.suse.com)
> 
> -- 
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> 

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About