public function isAlive()
    {
        if ($this->getStatus() == Aoe_Scheduler_Model_Schedule::STATUS_RUNNING) {
            if (time() - strtotime($this->getLastSeen()) < 2 * 60) { // TODO: make this configurable
                return true;
            } elseif ($this->getHost() == gethostname()) {
                if ($this->checkPid()) {
                    $this
                        ->setLastSeen(strftime('%Y-%m-%d %H:%M:%S', time()))
                        ->save();
                    return true;
                } else {
                    $this->markAsDisappeared(sprintf('Process "%s" on host "%s" cannot be found anymore', $this->getPid(), $this->getHost()));
                    return false; // dead
                }
            } else {
                // we don't know because the task is running on a different server
                return null;
            }
        }
        return false;
    }
public function isAlive()
    {
        if ($this->getStatus() == Aoe_Scheduler_Model_Schedule::STATUS_RUNNING) {
            if (time() - strtotime($this->getLastSeen()) < 2 * 60) { // TODO: make this configurable
                return true;
            } elseif ($this->getHost() == gethostname()) {
                if ($this->checkPid()) {
                    $this
                        ->setLastSeen(strftime('%Y-%m-%d %H:%M:%S', time()))
                        ->save();
                    return true;
                } else {
                    $this->markAsDisappeared(sprintf('Process "%s" on host "%s" cannot be found anymore', $this->getPid(), $this->getHost()));
                    return false; // dead
                }
            } else {
                // we don't know because the task is running on a different server
                return null;
            }
        }
        return false;
    }
public function isAlive ( ) { if ( $ this -> getStatus ( ) == Aoe_Scheduler_Model_Schedule :: STATUS_RUNNING ) { if ( time ( ) - strtotime ( $ this -> getLastSeen ( ) ) < 2 * 60 ) { // TODO: make this configurable return true ; } elseif ( $ this -> getHost ( ) == gethostname ( ) ) { if ( $ this -> checkPid ( ) ) { $ this -> setLastSeen ( strftime ( '%Y-%m-%d %H:%M:%S' , time ( ) ) ) -> save ( ) ; return true ; } else { $ this -> markAsDisappeared ( sprintf ( 'Process "%s" on host "%s" cannot be found anymore' , $ this -> getPid ( ) , $ this -> getHost ( ) ) ) ; return false ; // dead } } else { // we don't know because the task is running on a different server return null ; } } return false ; }
Is this process still alive?

true -> alive
false -> dead
null -> we don't know because the task is running on a different server

@return bool|null
Is this process still alive?