Crontab error: Class “OC\BackgroundJob\TimedJob” not found

Nextcloud version (eg, 29.0.5): 29.0.6
Operating system and version (eg, Ubuntu 24.04): Ubuntu 23.10
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.57
PHP version (eg, 8.3): 8.2.10

I have this message about crontab: Last background job execution ran 3 months ago. Something seems wrong. Check the background job settings.

If I type the command crontab -e -u www-data I have this command at the end: */5 * * * * php8.2 -f /var/www/html/nextcloud/cron.php

Checking the logs I have this: Error
Class “OC\BackgroundJob\TimedJob” not found

How can I fix this issue???

Same issue here:

$ php -f /var/www/nextcloud/cron.php --define apc.enable_cli=1
Error: Class "OC\BackgroundJob\TimedJob" not found in /var/www/nextcloud/apps/backup/lib/Cron/Manage.php:52
Stack trace:
#0 /var/www/nextcloud/lib/composer/composer/ClassLoader.php(576): include()
#1 /var/www/nextcloud/lib/composer/composer/ClassLoader.php(427): Composer\Autoload\{closure}()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): ReflectionClass->__construct()
#4 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(146): OC\AppFramework\Utility\Simple
Container->resolve()
#5 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(471): OC\AppFramework\Utilit
y\SimpleContainer->query()
#6 /var/www/nextcloud/lib/private/ServerContainer.php(155): OC\AppFramework\DependencyInjection\DIContainer->qu
eryNoFallback()
#7 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#8 /var/www/nextcloud/lib/public/Server.php(55): OC\AppFramework\Utility\SimpleContainer->get()
#9 /var/www/nextcloud/lib/private/BackgroundJob/JobList.php(326): OCP\Server::get()
#10 /var/www/nextcloud/lib/private/BackgroundJob/JobList.php(235): OC\BackgroundJob\JobList->buildJob()
#11 /var/www/nextcloud/cron.php(163): OC\BackgroundJob\JobList->getNext()
#12 {main}

The issue appears to be because you have the Backup app force enabled. It isn’t released for v29: Backup - Apps - App Store - Nextcloud

Disable the app.

1 Like

I have not that app installed. What about me?

I’ve found the app that caused the issue and disabled it. Now it works!

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.