Since you can use cron, how about just telling cron to execute the script every 10 minutes? this would prevent you from having to keep tabs on it if for whatever reason it hangs/dies. I don't know what sort of control you have with the server, but if it's ever down for maintenance, you are going to have to restart your script. cron will come up with the box and every 10 minutes your job will run. If anything you gain the peace of mind knowing that your script even if it dies a horrible death, with just start back up again without your intervention. (covers you on weekends, vacations, pub crawls... :-)

is the requirement to execute every 10 minutes, or is it to act on lets say a new file appearing on the system (about every 10 minutes)? if you need to act immediately then I suppose cron may not be the best tool, then again you could alway increase the frequency of the cron job.

Seems a good candidate for cron, plus you don't have to code a quasi-scheduler yourself (leverage others hard work).

good luck with whatever you decide!


In reply to Re: Using Trigger Files by wardk
in thread Using Trigger Files by azatoth

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.