Cron.php has an error and does not complete

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

PHP Fatal error:  Uncaught Error: Call to a member function getLogger() on null in /home/y4x/public_html/nextcloud/cron.php:162
Stack trace:
#0 {main}
  thrown in .../nextcloud/cron.php on line 162

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.9): 20.0.9
Operating system and version (eg, Ubuntu 20.04): Centos 7
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.46 (cPanel)
PHP version (eg, 7.4): 7.3.27

The issue you are facing:

Cron does not work and hangs when I run it manually using the following command:
php -f /home/y4x/public_html/nextcloud/cron.php

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. run php -f /home/y4x/public_html/nextcloud/cron.php

The output of your Nextcloud log in Admin > Logging:

Nothing there related to cron.php

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):


The output of your Apache/nginx/system log in /var/log/____:

$CONFIG = array (
  'instanceid' => '*************',
  'passwordsalt' => '**************************',
  'secret' => '**************************************',
  'trusted_domains' =>
  array (
    0 => 'nc.********.biz',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/var/nc_data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://**********',
  'dbname' => '*********',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '**********',
  'dbpassword' => '***********',
  'installed' => true,
  'maintenance' => false,
  'tempdirectory' => '/var/nc_data/tmp',
  'trashbin_retention_obligation' => 'auto,30',
  'versions_retention_obligation' => 'auto,2',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'logfilemode' => 416,
  'loglevel' => 2,
  'logtimezone' => 'America/Boise',
  'log_rotate_size' => 10485760,
  'activity_expire_days' => 4,
  'theme' => '',
  'updater.secret' => '*************',

I guess I got the info in the wrong place. Don’t use this much. Sorry.