I have a script that runs every 15 minutes but sometimes if the box is busy it hangs and the next process will start before the first one is finished creating a snowball effect.
Use this script:
FILE="/tmp/my_file" if [ -f "$FILE" ]; then echo "Still running" exit fi trap EXIT "rm -f $FILE" touch $FILE ...script here...
This script will create a file and remove it on exit.