static function init() { $command = self::getCommand(); if ($command) { WPAdm_Core::$cron = false; wpadm_class::$type = 'full'; //$time_load = ini_get("max_execution_time"); //WPAdm_Core::log('proccess is work ' . $time_load . 'sec'); /*if ($time_load != 0) { self::run($time_load - 5); } else { self::run(90); } */ self::run(30); if (self::checkLock()) { $core = new WPAdm_Core($command, 'full_backup_dropbox', DRBBACKUP_BASE_DIR); if ($result = $core->getResult()->toArray(true)) { if ($result['result'] == 'success') { self::delCommand($command['method']); self::stop(); self::setCommandResultData($command['method'], $result); self::init(); } elseif ($result['result'] == 'error') { self::setCommandResultData($command['method'], $result); self::stop(); self::init_params_default(); } } } } }