I'd like to hear more about what it is that you are going to do with this hour by hour logging info?
I have to add the timerservice in existing perl project jumps right away to an implementation. This can become quite complex and I suggest backing up and starting anew with an end objective in mind, eg the desired user report that this will be used for.
Before going further, I would suggest that whatever the implementation, that you have an easier to use format for the log entries. "pdt1 2009/08/30 16:07:55", YYYY/MM/DD and use leading zero's. The reason for this order is so that a simple default sort on date/time will produce the right order without heroics. Since you are designing the log file output format, make it easy for you to deal with!
Past that, it appears that you have 3 states that are potentially relevant: I just started, I am still running now, I just stopped. While I am on this subject, it could be that you want the PID of each pdt1 process?
What would "some instance of my program was alive at this particular time which is 12 minutes past the hour, each hour" tell you? Usually not much.
Anyway, before going further into implementation, I would like to hear more about what kind of "end product" you intend to produce (presumably a report). What is going to be in that report?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.