Under an Unix installations (e.g. Linux) you could use a cron job for this and tell it to start the script every two minutes. Just google after 'cron job'.
To code it in perl, e.g. for Windows without cron daemon, you could write something like this:
while ( 1 ) {
system("perl get_value.pl");
sleep(120);
}
This would delay for two minutes after the get_values script ended. You might want to add an possibility to stop this loop without killing the perl process.
Update:
This might look like a repost of an above post, but I got interrupted for an half hour after I wrote this post but before I could sent it. Afterwards I was just sending it without checking if anyone else gave the same answer in the meantime.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|