[Vtigercrm-developers] CronTask module

Adam Heinz amh at metricwise.net
Fri Jun 21 13:56:29 UTC 2013


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).


On Thu, Jun 20, 2013 at 8:29 AM, Joe Bordes <joe at tsolucio.com> wrote:

> Hi,
>
> I just had an incident where a client launched a large import (12000
> products).
> The cron launched the first time and marked the process as running.
> After 15min, the next cron launched and the import process was launched
> again. Then after 15min more, another process was launched....
>
> After about 15000 products imported and taking forever the client
> contacted us.
>
> I had a look at the code and see that the status of running is not
> consulted only the frequency :-(
>
> The attached patch should fix this problem.
>
> 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.
>
>
> 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? ...
>
> --
> Un saludo
> Joe
> TSolucio
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20130621/a4425ade/attachment.html>


More information about the vtigercrm-developers mailing list