I'm not a huge fan of running periodic tasks through the public-facing app, but it works. One of the problems would be if the public hit the app with so many requests that there weren't available workers to serve the cron jobs. Another problem is the potential for hackers who found your source code to issue bogus cron tasks from the public.

An easy solution is to run another copy of the Catalyst app (or even a second Catalyst app entirely) for handling cron tasks, and not expose it to the public. This also lets you restart them independently, knowing whether you're disrupting the users or crashing a long-running cron task.


In reply to Re^2: Daemonizing (or otherwise speeding up) a high-overhead script? by NERDVANA
in thread Daemonizing (or otherwise speeding up) a high-overhead script? 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.