Reputation: 5264
I have several php scripts in a crontab which run every night, are not related to each other, and share no resources that I am aware of. They start at the same time and should run concurrently each doing their own task -- but from the logs that they each print I see that it looks like they are waiting on each other as if I only have one thread. Is there any way that the cron process is only letting one of them run at a time and if so how can I have them run in parallel?
Edit: I am running the cron instructions in the 'foreground' but does anyone know if it would make a difference for me to put & after each line?
Upvotes: 3
Views: 130
Reputation: 5174
Probably there is some locking going on that makes the scripts wait for each other to finish.
Are you doing any database operations on the same table that might cause locks to it? ( You could probably throw an xdebug to each and profile them to see what is taking too long.
See more information on xdebug profiler here: http://xdebug.org/docs/profiler
Upvotes: 1