public function run(EdgarCron $edgarCron): bool
    {
        try {
            $now = new \DateTime('now');
            $edgarCron->setStarted($now);
            $this->getEntityManager()->persist($edgarCron);
            $this->getEntityManager()->flush();
        } catch (ORMException $e) {
            return false;
        }

        return true;
    }
public function run(EdgarCron $edgarCron): bool
    {
        try {
            $now = new \DateTime('now');
            $edgarCron->setStarted($now);
            $this->getEntityManager()->persist($edgarCron);
            $this->getEntityManager()->flush();
        } catch (ORMException $e) {
            return false;
        }

        return true;
    }
public function run ( EdgarCron $ edgarCron ) : bool { try { $ now = new \ DateTime ( 'now' ) ; $ edgarCron -> setStarted ( $ now ) ; $ this -> getEntityManager ( ) -> persist ( $ edgarCron ) ; $ this -> getEntityManager ( ) -> flush ( ) ; } catch ( ORMException $ e ) { return false ; } return true ; }
Run cron command.

@param EdgarCron $edgarCron cron command

@return bool
Run cron command .