<div dir="ltr">A traditional Unix solution to this problem is to write a .pid (process id) file to disk when a run starts and delete it when a run finishes.  Overlapping runs check to see if that file exists and if it does, they check to see if there is a running process with that id.  You can also compare the age of the file to the current time and add logic to kill the existing process if it has been running too long (which also catches a hung process).</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 20, 2013 at 8:29 AM, Joe Bordes <span dir="ltr"><<a href="mailto:joe@tsolucio.com" target="_blank">joe@tsolucio.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I just had an incident where a client launched a large import (12000 products).<br>
The cron launched the first time and marked the process as running.<br>
After 15min, the next cron launched and the import process was launched again. Then after 15min more, another process was launched....<br>
<br>
After about 15000 products imported and taking forever the client contacted us.<br>
<br>
I had a look at the code and see that the status of running is not consulted only the frequency :-(<br>
<br>
The attached patch should fix this problem.<br>
<br>
I also compared the 5.4.0 CronTask module with the current EA to see if it had been corrected and saw that the problem is still there and that somebody has left a $log->fatal() debug message in the CronTask code. That should be eliminated from there.<br>

<br>
<br>
These things make me think: over a year after this feature was introduced nobody commented nor fixed this? Is anybody really using this? Am I doing something wrong? ...<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Un saludo<br>
Joe<br>
TSolucio<br>
<br>
</font></span><br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br></div>