setOption('path', MIBEW_FS_ROOT . '/cache/stash'); // Run plugins if (get_maintenance_mode() === false) { $plugin_manager = PluginManager::getInstance(); $plugin_manager->setCache($cache_factory->getCache()); $plugin_manager->loadPlugins($configs['plugins']); } // Do the job. $worker = new CronWorker($cache_factory->getCache()); $success = $worker->run(); if ($success) { echo("All cron jobs done\n"); } else { echo("Cron job failed. Here are the errors:\n"); foreach ($worker->getErrors() as $error) { echo(' ' . $error . "\n"); } }