Don't run cron job if already running

Posted by webnoob on Server Fault See other posts from Server Fault or by webnoob
Published on 2011-02-19T21:06:55Z Indexed on 2011/02/19 23:26 UTC
Read the original article Hit count: 189

Filed under:
|
|
|
|

Hi All,

I know this question has been asked already but I either didn't understand the answer or it didn't apply to me.

I have a php script that I am calling every 1 minute using CPanel to set up the Cron Job. The nature of the script means that it could overrun for just over the minute so I need to know how to stop the next one running if the first one hasn't completed.

I have a VPS running CENTOS 5.5 and have access to WHM and CPanel. I have never used Linux before (only just got the server yesterday) so I have no idea what I am doing and would appreciate some help if possible. If I need to provide more information please let me know (I don't know what info you would need at the moment).

Thanks.

© Server Fault or respective owner

Related posts about linux

Related posts about php