Ask a Question related to PERL Modules, Design and Development.
-
packat #1
web page automatic update
I wanted to generate a web page using CGI scripts. The script would
query a database and display result. I wanted to make the page
automatically update at a regular pace, say every 1 minute.
Is there a perl function that would do this?
Thnaks
pac
packat Guest
-
How to attached automatic flash update to website
Our website doesn't contain all the text for buttons when opened on certain computers, i'm not sure but it maybe because the computers in question... -
Automatic Contribute 4 Update Causes Problems withOffice
I have several users that have been using Contribute successfully for a couple years now and were on version 3.0. They received a popup that... -
Can you set up an automatic page update based on time?
I was curious if, in dreamweaver, you can set up a page to automatically update at a certain time. For instance, I want the home page to replace 2... -
Problem with Automatic Update Version 7.01
This feature has never worked since I bought and installed Adobe Photoshop 7.01 several months ago. Whenever I try to update the product via the... -
Automatic Update
Does the little earth icon show up in the task bar when the computer is automatically downloading updates when I'm online? I have a dial-up... -
Sherm Pendley #2
Re: web page automatic update
packat wrote:
Sure, just cache the generated results somewhere. When the CGI is hit,> I wanted to generate a web page using CGI scripts. The script would
> query a database and display result. I wanted to make the page
> automatically update at a regular pace, say every 1 minute.
>
> Is there a perl function that would do this?
check the cache - if the file with the results page is either missing or
more than a minute old, regenerate it before sending it.
For checking the presence and/or age of a file, the file test operators
are your friends. See 'perldoc -f -X'.
sherm--
--
Cocoa programming in Perl: [url]http://camelbones.sourceforge.net[/url]
Hire me! My resume: [url]http://www.dot-app.org[/url]
Sherm Pendley Guest
-
Jürgen Exner #3
Re: web page automatic update
packat wrote:
Starting jobs at a regular interval (or at a given time) is typically done> I wanted to generate a web page using CGI scripts. The script would
> query a database and display result. I wanted to make the page
> automatically update at a regular pace, say every 1 minute.
>
> Is there a perl function that would do this?
using the job scheduler of you operating system ("cron" on Unix, "at" or
"Task Scheduler" on Windows, etc.). However, I am not certain that all
common job schedulers support a resolution of 1 minute.
If accuracy of the timing is not a major concern of yours, then you could
use Perl's sleep() function to send the process to sleep for a minute (there
may be systematic inaccuracies, which will add up over time. If you want to
catch those you would have to keep track of the time in your program
yourself).
But if you go that route you will still need to provide initial startup and
a watchdog mechanism, which would restart the program when it terminates or
get hung for whatever reason. The job scheduler would do that part for you
for free.
jue
Jürgen Exner Guest
-
gnari #4
Re: web page automatic update
"packat" <packat@nowhere.com> wrote in message
news:Z2zTc.803$og.443@nwrddc04.gnilink.net...If you want the page generation to happen every minute,> I wanted to generate a web page using CGI scripts. The script would
> query a database and display result. I wanted to make the page
> automatically update at a regular pace, say every 1 minute.
>
> Is there a perl function that would do this?
see other answers.
if you just want the browser to
automatically refresh, then this is not a perl matter,
but a HTML or javascript.
in that case you should ask the relevant newsgroups for
better info, but sometimes this is done with a <META> tag
gnari
gnari Guest
-
Arnold Huebsch #5
Re: web page automatic update
packat wrote:
> I wanted to generate a web page using CGI scripts. The script would
> query a database and display result. I wanted to make the page
> automatically update at a regular pace, say every 1 minute.
>
> Is there a perl function that would do this?
using CGI.pm you might do the following:
print $query->header(-REFRESH=>"60");
to generate a selref reshing WEB page.
--
Arnold Huebsch
Arnold Huebsch Guest



Reply With Quote

