Hi,

I'm running a site which uses a script with some pretty heavy processing to do on user input, to generate a new page. This means that the user has to wait a long time for the next page, which is not good.

I have redesigned the script to update a database then go to the previously printed version of the page, which is instant, but doesnot contain the changes. That's okay because it frees them up to carry on working. My question is how can I action a script to create a new page in the background so that the next time the user inputs, the new page is ready to view?

I am currently doing this by cron but I would prefer the update to be actioned by the user during the use of the script, on the basis that the update script is 'pinged' but operates independently so the user can go ahead with the next task, without being delayed by the processing.

I'd be interested in the thoughts anyone might have to action this.


In reply to calling one cgi script from another by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.