in reply to
Non-Blocking Semaphore
Well
Simple Locking
was my answer to a similar problem. Though I didn't worry about sub-second timeouts because nightly crons generally don't care.
Comment on
RE (tilly) 1: Non-Blocking Semaphore
In Section
Seekers of Perl Wisdom