Want to have delay in multiple instances of the same shell script

Hello,
My goal is to run the same Shell script in a parallel mode. This script will get triggered from different machines and different application teams by some job scheduling tool.
They may trigger the process at the same time. so I want to have them in QUEUE ..and release them for execution on first come first server basis (FCFS).
to handle this situation, I am creating one control (dummy) file run_time at particular path and checking the existence of this file for queuing multiple calls for this script.
But as Job scheduling tool is triggering multiple jobs at the same time. By the time first process crates that control file, second job checks and does not find any control file in the given path and it also goes in execution mode instead of waiting mode.
I want to have some delay when job scheduling tool triggers the process at the same time.
How do I handle this in UNIX please?

I prefer to use lock directories instead of lock files. It is not possible, that two concurrent mkdir's both succeed (if you do not use the -p switch). So make a call to mkdir and if you succeed, let your script continue or go into waiting mode otherwise.

In ksh93/bash (maybe other bourne-compatibles too):

sleep $(( ${RANDOM} % 30 +1 ))

will make your script sleep for a random interval between 1 and 30 seconds.

a simple (but not the safest) way to avoid concurrent runnings of the same script. To write at the beginning

#!/bin/bash
while pidof -x -o $$ ${0##*/}; do sleep 1; done
(...)