public function addCron(CronInterface $cron, string $alias, int $priority, string $expression, string $arguments)
    {
        if (!isset($this->crons[$priority])) {
            $this->crons[$priority] = [];
        }
        $cron->setAlias($alias);
        $cron->addArguments($arguments);
        $cron->addPriority($priority);
        $cron->addExpression($expression);
        $this->crons[$priority][$alias] = $cron;
    }
public function addCron(CronInterface $cron, string $alias, int $priority, string $expression, string $arguments)
    {
        if (!isset($this->crons[$priority])) {
            $this->crons[$priority] = [];
        }
        $cron->setAlias($alias);
        $cron->addArguments($arguments);
        $cron->addPriority($priority);
        $cron->addExpression($expression);
        $this->crons[$priority][$alias] = $cron;
    }
public function addCron ( CronInterface $ cron , string $ alias , int $ priority , string $ expression , string $ arguments ) { if ( ! isset ( $ this -> crons [ $ priority ] ) ) { $ this -> crons [ $ priority ] = [ ] ; } $ cron -> setAlias ( $ alias ) ; $ cron -> addArguments ( $ arguments ) ; $ cron -> addPriority ( $ priority ) ; $ cron -> addExpression ( $ expression ) ; $ this -> crons [ $ priority ] [ $ alias ] = $ cron ; }
Add cron to crons list.

@param CronInterface $cron cron
@param string $alias cron alias
@param int $priority cron priority
@param string $expression
@param string $arguments cron arguments
Add cron to crons list .