src/Cron.php
function add(string $name, int $when, callable $callback, $param = null, bool $persistent) {
        if (isset($this->_tasks[$name]))
            Console::warning("Overwriting cron task \"$name\".");
        $this->_tasks[$name] = [
            0 => $when,
            1 => $callback,
            2 => $param,
            3 => $persistent
        ];
    }
function add(string $name, int $when, callable $callback, $param = null, bool $persistent) {
        if (isset($this->_tasks[$name]))
            Console::warning("Overwriting cron task \"$name\".");
        $this->_tasks[$name] = [
            0 => $when,
            1 => $callback,
            2 => $param,
            3 => $persistent
        ];
    }
function add ( string $ name , int $ when , callable $ callback , $ param = null , bool $ persistent ) { if ( isset ( $ this -> _tasks [ $ name ] ) ) Console :: warning ( "Overwriting cron task \"$name\"." ) ; $ this -> _tasks [ $ name ] = [ 0 => $ when , 1 => $ callback , 2 => $ param , 3 => $ persistent ] ; }
新建计划任务

@param string $name
@param int $when
@param callable $callback
@param null $param
@param bool $persistent
新建计划任务