web page automatic update

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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?
    Sure, just cache the generated results somewhere. When the CGI is hit,
    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

  4. #3

    Default 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?
    Starting jobs at a regular interval (or at a given time) is typically done
    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

  5. #4

    Default Re: web page automatic update

    "packat" <packat@nowhere.com> wrote in message
    news:Z2zTc.803$og.443@nwrddc04.gnilink.net...
    > 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?
    If you want the page generation to happen every minute,
    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

  6. #5

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139