src/Core/Schedule/ScheduleEvent.php
public function setExpression($expression)
    {
        if (is_string($expression)) {
            $expression = CronExpression::factory($expression);
        }

        $this->expression = $expression;

        return $this;
    }
public function setExpression($expression)
    {
        if (is_string($expression)) {
            $expression = CronExpression::factory($expression);
        }

        $this->expression = $expression;

        return $this;
    }
public function setExpression ( $ expression ) { if ( is_string ( $ expression ) ) { $ expression = CronExpression :: factory ( $ expression ) ; } $ this -> expression = $ expression ; return $ this ; }
Method to set property expression

@param CronExpression|string $expression

@return  static  Return self to support chaining.

@since  3.5.3
Method to set property expression