WordPress at a glance
function is not described

CronExpression::setExpression() public WC 1.0

Set or change the CRON expression

{} It's a method of the class: CronExpression{}

No Hooks.

Return

CronExpression.

Usage

$CronExpression = new CronExpression();
$CronExpression->setExpression( $value );
$value(string) (required)
CRON expression (e.g. 8 )

Code of CronExpression::setExpression() WC 5.0.0

<?php
public function setExpression($value)
{
    $this->cronParts = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY);
    if (count($this->cronParts) < 5) {
        throw new InvalidArgumentException(
            $value . ' is not a valid CRON expression'
        );
    }

    foreach ($this->cronParts as $position => $part) {
        $this->setPart($position, $part);
    }

    return $this;
}