|Perl Monk, Perl Meditation|
Of crontab and pathsby jimbus (Friar)
|on Aug 18, 2005 at 15:49 UTC||Need Help??|
jimbus has asked for the
wisdom of the Perl Monks concerning the following question:
So with scripts in crontab, you are supposed to explicit paths. But whats a good way to specify the path to a config file?
In a previous thread it was noted that I had several versions of a script running and that I running a single script (or links from a single script) and using config files to differentiate.
Well only 2 scripts of the 4 were copies of each other, but I see the wisdom in centerally locating them and maintaining one piece of code. (also, the wisdom of using distinct script names :) I found a sub for reading java style properties into a hash and added it to my local Utils package. Now I'm wondering what the SOP is for getting the conf file to the cron script.
I suppose this is a style thing, but it seems kind of hokey to hardcode a config path into it (I'm passing the node name to use as the finally subdir). I was wondering if I could assume the directory was local to the script once it was running or if I should just specify the full path and file name as an option on the commandline.
a ravenous Jimbus mumbles, "Never moon a werewolf!"
PS: I've been following the seeker's page for a couple days and I think its superb that you guys can/will tackle anything. I've yet to see anyone left hanging. I use other forums for differnt products and sometimes it like they saw me coming and left. (insert witty barb here) I wonder sometimes if I have issues communicating or I'm that out of touch with the intended usage of the product... anyhow, thanks again.