Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
As others have said 2 & 3 are similar.

I've done it both ways for various things, personally I like the ease of cron, but it has some disadvantages you should know as well:

  1. Cron can crash, if you're not aware of this, then your entire process will fail.
  2. cron can be tricky to work with as it doesnt source and environment, stuff that works interactively may not work with cron.

OTOH, if you're daemonising the process you can do some cool stuff like starting it via the init.d, you can see if it is explicitly alive by looking at the process table. The down side is it may die at any time for any reason, memory, a bug, whatever.

Bottom line, is you do what you're comfortable with, and add monitoring. You want to know if your process is alive, or your cron job has run, you want to be alerted if your job abends, or your daemon fails.

There are a couple of methods i use which seem to work quite well.. checking the last update of your log file, will implicitly tell you everything is ok. If possible you should monitor the functionality of your daemon/job, so you can explicitly tell if its run..

In reply to Re: Cron or running process? by Ryszard
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.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2022-11-30 10:59 GMT
Find Nodes?
    Voting Booth?