. * */ namespace OCA\News\Backgroundjob; use \OCA\News\DependencyInjection\DIContainer; class Task { static public function run() { $container = new DIContainer(); // make it possible to turn off cron updates if you use an external // script to execute updates in paralell if ($container['useCronUpdates']) { $container['Updater']->beforeUpdate(); $container['Updater']->update(); $container['Updater']->afterUpdate(); } } }