I have a cronjob which runs php on a wordpres cron.php file. Its mainly used to schedule post and i believe it may refresh cache. Anyways...
I run the cron job every minute. I checked out the ps often and i see TWO php instance running cron.php. Now this is unnecessary because running one instance will do everything it needs to. I have another job which checks for ram and sometimes two instance trip it off (i expect a high amount of ram available at all times, i can lower it but i dont want to). I hardly believe one job can take more than a minute (although it may).
How do i run a job but not if the process exist already? I don't think the php code itself can check unless it connects/uses the db? Is there a cron command i may use? I don't want to kill an instance if its >1minute. Just not spawn new ones.
