public function run()
    {
        // check if cron instances is defined
        if (!isset($this->configs['instances']) || !Any::isArray($this->configs['instances'])) {
            return null;
        }

        // get timestamp
        $time = time();
        $log = [];

        // each every one instance
        foreach ($this->configs['instances'] as $callback => $delay) {
            if (((int)$this->configs['log'][$callback] + $delay) <= $time) {
                // prepare cron initializing
                list($class, $method) = explode('::', $callback);
                if (class_exists($class) && method_exists($class, $method)) {
                    // make static callback
                    forward_static_call([$class, $method]);
                    $log[] = $callback;
                }
                // update log information
                $this->configs['log'][$callback] = $time + $delay;
            }
        }

        // write updated configs
        App::$Properties->writeConfig('Cron', $this->configs);
        return $log;
    }
public function run()
    {
        // check if cron instances is defined
        if (!isset($this->configs['instances']) || !Any::isArray($this->configs['instances'])) {
            return null;
        }

        // get timestamp
        $time = time();
        $log = [];

        // each every one instance
        foreach ($this->configs['instances'] as $callback => $delay) {
            if (((int)$this->configs['log'][$callback] + $delay) <= $time) {
                // prepare cron initializing
                list($class, $method) = explode('::', $callback);
                if (class_exists($class) && method_exists($class, $method)) {
                    // make static callback
                    forward_static_call([$class, $method]);
                    $log[] = $callback;
                }
                // update log information
                $this->configs['log'][$callback] = $time + $delay;
            }
        }

        // write updated configs
        App::$Properties->writeConfig('Cron', $this->configs);
        return $log;
    }
public function run ( ) { // check if cron instances is defined if ( ! isset ( $ this -> configs [ 'instances' ] ) || ! Any :: isArray ( $ this -> configs [ 'instances' ] ) ) { return null ; } // get timestamp $ time = time ( ) ; $ log = [ ] ; // each every one instance foreach ( $ this -> configs [ 'instances' ] as $ callback => $ delay ) { if ( ( ( int ) $ this -> configs [ 'log' ] [ $ callback ] + $ delay ) <= $ time ) { // prepare cron initializing list ( $ class , $ method ) = explode ( '::' , $ callback ) ; if ( class_exists ( $ class ) && method_exists ( $ class , $ method ) ) { // make static callback forward_static_call ( [ $ class , $ method ] ) ; $ log [ ] = $ callback ; } // update log information $ this -> configs [ 'log' ] [ $ callback ] = $ time + $ delay ; } } // write updated configs App :: $ Properties -> writeConfig ( 'Cron' , $ this -> configs ) ; return $ log ; }
Run cron task. Attention - this method is too 'fat' to run from any app's
@return array|null
Run cron task . Attention - this method is too fat to run from any app s