BrowserUK brings up some good points. The nature of your script's operation will dictate the kind of solution you'll want to use.

I'll share one kind of solution I've used in a Unix environment. Something that needs to operate once a minute is just a little too frequent to use cron for. However, that doesn't mean that you couldn't use it to check on your process every so often just to make sure it is still running and restart it if necessary. I've seen long-running scripts which either purposely terminate or re-start themselves every so often to "clear out the cruft" that can build up over a long running session. Sometimes it's due to unavoidable memory or resource leaks, but it is also just defensive programming. I've even heard of companies which rebooted their machines every day (but that was a while ago, like back in the perl4 days.)


In reply to Re: Long running Perl scripts (on purpose) by pc88mxer
in thread Long running Perl scripts (on purpose) by kansaschuck

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.