script - how to prevent in parallel run

[LEFT]I have one shell script which is being accessed by many jobs at same time.
I want to make the script such that , other job should wait for the script if script is being used by some other job. Is there any way to implement it in script level ?

Gops[/LEFT]

check out this thread

if the script is running (called by any other parent script), the .lock file will be present.
you can have this check in your parent script based on that,do further processing.

if [ -f "scriptname.lock" ]; then
 echo "the script already used by some other process"
 ## take action as needed
fi