Bash script that cannot be run more than once at the same time
People dealing with cron, and bash scripts that might take a bit longer than they're supposed to often encounter the following behaviour. Suppose that you launch something from cron in say every hour. The stuff usually completes in 10 minutes, but sometimes, when the load peaks, or network clogs, the process is running much slower. After an hour an other one is launched, further hogging the resources of the machine and possibly messing up data. The solution for this is to pay attention not to run twice of course (and also to fix the underlying problem that causing the slowdowns).