cronjob should not execute the shell script if it is already running
Can someone please help me here with an idea or a code.

I have a cron running for every 5 minutes. It makes my script run for more than 5 minutes in some cases. I want to restrict my script not to execute if the script is already running.

I dont know how to let the cron know that the script is already running. Please suggest. My script won't create any lock files.

Thanks
cronjob should not execute the shell script if it is already running
===

Can someone please help me here with an idea or a code.

I have a cron running for every 5 minutes. It makes my script run for more than 5 minutes in some cases. I want to restrict my script not to execute if the script is already running.

I dont know how to let the cron know that the script is already running. Please suggest. My script won't create any lock files.

Thanks