Bracing against the wind  

Thursday, December 14, 2006

Running Perl Programs as Services

Taking spur of the moment notes, responses to phone calls, ideas, things to do, etc. is something I prefer to do very rapidly. I never seem to manage to have "task software" installed on a given machine, nor do I regularly have web access. Nor would I want to wait, while in the middle of a thought, for a program to open, or a web page to load. Some people use a pen, but that requires me to lift my hands from the keyboard (slows me down). Plus I can type faster than I can write.

My solution is to create a shortcut to a text file on the Desktop assign a key sequence to it. I press Control-Shift-T and a text file pops open. Then I add some dashes at the top as a "new entry" marker. I jot some notes down and Alt-F-S, Alt-F4. I rarely remember to time/datestamp my entries, so I'd wrote a program to do it for me.

If it looks complicated, that's because I decided to copy and paste some skeleton code from Win32::Daemon. It's terribly easy now to create Windows services out of Perl programs.

The program monitors my two text "note files" and updates them with timestamps within 1 second after being modified. It uses negligible CPU time. Archiving could be done automatically as well, moving 6 month old entries to a backup, but for now, I like to do that by hand.

Labels: ,

[View/Post Comments] [Digg] [] [Stumble]

Home | Email me when this weblog updates: | View Archive

(C) 2002 Erik Aronesty/DocumentRoot.Com. Right to copy, without attribution, is given freely to anyone for any reason.

Listed on BlogShares | Bloghop: the best pretty good | Blogarama | Technorati | Blogwise