runs every minute and i wanna check if the process is not running , run some commands.But the problem is that when i'm checking process on the system it is runnning more than one time and it's a lil weired . i check as following :
private function IsRunning(){
$result = explode("\n",trim(shell_exec("ps aux | grep -v grep | grep 'Fixer fix'")));
return count($result)==2 ? true:false;
}
Can u explain a bit why are u piping so many greps
Обсуждают сегодня