Repository/SmileCronRepository.php
public function isQueued($alias)
    {
        $query = $this->createQueryBuilder('c')
            ->where('c.alias = :alias')
            ->andWhere('c.ended is NULL')
            ->setParameter('alias', $alias)
            ->getQuery();

        $result = $query->setMaxResults(1)->getOneOrNullResult();

        if ($result)
            return true;

        return false;
    }
public function isQueued($alias)
    {
        $query = $this->createQueryBuilder('c')
            ->where('c.alias = :alias')
            ->andWhere('c.ended is NULL')
            ->setParameter('alias', $alias)
            ->getQuery();

        $result = $query->setMaxResults(1)->getOneOrNullResult();

        if ($result)
            return true;

        return false;
    }
public function isQueued ( $ alias ) { $ query = $ this -> createQueryBuilder ( 'c' ) -> where ( 'c.alias = :alias' ) -> andWhere ( 'c.ended is NULL' ) -> setParameter ( 'alias' , $ alias ) -> getQuery ( ) ; $ result = $ query -> setMaxResults ( 1 ) -> getOneOrNullResult ( ) ; if ( $ result ) return true ; return false ; }
Identify of cron command is queued

@param string $alias cron alias
@return bool true if cron is already queued
Identify of cron command is queued