There's more than one way to do things | |
PerlMonks |
Re: Checking for multiple instancesby dragonchild (Archbishop) |
on Sep 24, 2004 at 17:06 UTC ( [id://393594]=note: print w/replies, xml ) | Need Help?? |
Try having the script check for a running instance of itself as its first task. 'ps' is your friend here. I'm sure there's a CPAN that will do this for you.
Otherwise, what's wrong with using something like Cache::File? First thing you do is check the cache to see if the lock is set. If it is, leave. If it's not, set the lock. When you're done, release the lock. ------
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose I shouldn't have to say this, but any code, unless otherwise stated, is untested
In Section
Seekers of Perl Wisdom
|
|