diff --git a/lib/base.php b/lib/base.php index fda65a221c7d0e96f5ed20032a0ae9d46ae62bb4..631f93415461b01b67737932e6af7835ea5db186 100644 --- a/lib/base.php +++ b/lib/base.php @@ -561,7 +561,11 @@ class OC { */ public static function registerCacheHooks() { // register cache cleanup jobs - \OCP\BackgroundJob::registerJob('OC_Cache_FileGlobalGC'); + try { //if this is executed before the upgrade to the new backgroundjob system is completed it will throw an exception + \OCP\BackgroundJob::registerJob('OC_Cache_FileGlobalGC'); + } catch (Exception $e) { + + } OC_Hook::connect('OC_User', 'post_login', 'OC_Cache_File', 'loginListener'); }