BadMethodCallException: Not in batch when CRON runs

Each time (15 minutes) when cron.php is called I get this error in the log file:

Exception: {"Exception":"BadMethodCallException","Message":"Not in batch","Code":0,"Trace":"#0 \/var\/www\/owncloud\/lib\/private\/Files\/Utils\/Scanner.php(143): OC\Files\Cache\Propagator->commitBatch()\n#1 \/var\/www\/owncloud\/apps\/files\/lib\/BackgroundJob\/ScanFiles.php(87): OC\Files\Utils\Scanner->backgroundScan('')\n#2 \/var\/www\/owncloud\/apps\/files\/lib\/BackgroundJob\/ScanFiles.php(111): OCA\Files\BackgroundJob\ScanFiles->runScanner(Object(OC\User\User))\n#3 \/var\/www\/owncloud\/lib\/private\/BackgroundJob\/Job.php(52): OCA\Files\BackgroundJob\ScanFiles->run(NULL)\n#4 \/var\/www\/owncloud\/lib\/private\/BackgroundJob\/TimedJob.php(53): OC\BackgroundJob\Job->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))\n#5 \/var\/www\/owncloud\/cron.php(122): OC\BackgroundJob\TimedJob->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))\n#6 {main}","File":"\/var\/www\/owncloud\/lib\/private\/Files\/Cache\/Propagator.php","Line":145}

Hi,

if you have a look at the known issues thread as asked in the shown template when creating a new thread you will see that this is a known bug which gets fixed with 9.1.1:

Fix is upcoming. Patch is here:

Thanks for the tip about the patch. Works like a charm :slight_smile: