Backend\Core\Engine\Cronjob::setAction PHP Method

setAction() public method

We can't rely on the parent setModule function, because a cronjob requires no login
public setAction ( string $action, string $module = null )
$action string The action to load.
$module string The module to load.
    public function setAction($action, $module = null)
    {
        // set module
        if ($module !== null) {
            $this->setModule($module);
        }
        // check if module is set
        if ($this->getModule() === null) {
            throw new Exception('Module has not yet been set.');
        }
        // set property
        $this->action = (string) $action;
    }