Skip to content

Tag Archives: lockfile

Using Linux command lockfile in bash scripts

14-Jul-10

I needed to create a script that runs a regression test. I intended to schedule this with a cron job. However, I found that sometimes, my cron jobs would collide with each other. So, I looked to Linux’ command to create a file lock as a semaphore. Here’s the incantation: [cc_bash] # if we’re already […]