code: private function isrunning()
  	{
  		$pids = explode(PHP_EOL, `ps -e | awk '{print $1}'`);
  		if (in_array($this->pid, $pids))
  			return true;
  
  		return false;
  	}
docs: Check to see if a cronjob is already running
  
  @return bool