Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
Well in your specific application it appears that option 2 and 3 are very similar (with regards to frequency of execution) so the added system resources being chewed up by a deamon running constantly in the background does not outweight the need to be real time. I would go with number 2. This option for your scenerio will be most practical, applicable and resource friendly.

If you fell the need to be almost real time you can setup a cron job to run every minute and check the target files and still be more efficient than a running app in the background. Even if a running app does this very thing (meaning run at startup and poll the file every 60 seconds then sleep for 60 seconds and do it again) it is still using system resources while sleeping.

In reply to Re: Cron or running process? by Elijah
in thread Cron or running process? by michellem

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.