protected function setExpression($expression)
    {
        if (is_string($expression)) {
            $expression = CronExpression::factory($expression);
        } elseif (!$expression instanceof CronExpression) {
            throw new \InvalidArgumentException('Expression should be a string or an instanceof CronExpression.');
        }
        $this->cronExpression = $expression;
    }