Cron: Nextcloud is not installed - only a limited number of commands are available

Nextcloud version Nextcloud Hub 6 (27.1.2):
Operating system and version (Ubuntu 22.04.3 LTS):
Apache or nginx version (Apache/2.4.52):
PHP version (PHP 8.1.2-lubuntu2.14 (cli)):

Cron does not appear to be running correctly, syslog file as follows.

Oct  9 14:50:01 [redacted] CRON[199029]: (www-data) CMD (php -f /var/www/html/cron.php)
Oct  9 14:50:50 [redacted] nextcloud.nextcloud-cron[199201]: Nextcloud is not installed - only a limited number of commands are available
Oct  9 14:55:01 [redacted] CRON[199731]: (www-data) CMD (php -f /var/www/html/cron.php)
Oct  9 14:55:50 [redacted] nextcloud.nextcloud-cron[199901]: Nextcloud is not installed - only a limited number of commands are available
Oct  9 15:00:01 [redacted] CRON[200423]: (www-data) CMD (php -f /var/www/html/cron.php)
Oct  9 15:00:50 [redacted] nextcloud.nextcloud-cron[200599]: Nextcloud is not installed - only a limited number of commands are available

Running the command interactively produces no error, however as it produced no output don’t know how to confirm that it worked. Nothing in the syslog related to me manually running the command as follows, twice:

root@[redacted]:/# sudo -u www-data php -f /var/www/html/cron.php
root@[redacted]:/# sudo -u www-data php -f /var/www/html/cron.php

This is a new build, the old server cron ran without issues, noting the old server had older versions of ubuntu, nextcloud, php and apache.

The output of your Nextcloud log in Admin > Logging:

Nothing related to cron in the portal log file.

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

<?php
$CONFIG = array (
  'instanceid' => 'instanceid',
  'passwordsalt' => 'passwordsalt',
  'secret' => 'secret',
  'trusted_domains' =>
  array (
    0 => 'servername',
    1 => 'servername.tld',
  ),
  'truxted_proxies' =>
  array (
    0 => 'servername',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '27.1.2.1',
  'overwrite.cli.url' => 'https://servername',
  'overwriteprotocol' => 'https',
  'dbname' => 'dbname',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'dbuser',
  'dbpassword' => 'dbpassword',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'fromname',
  'mail_domain' => 'fromdomain',
  'mail_smtphost' => 'smtpserver',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '465',
  'mail_smtpname' => 'smtpname',
  'mail_smtppassword' => 'smtppassword',
  'default_phone_region' => 'AU',
  'memcache.local' => '\OC\Memcache\APCu',
  'filelocking.enabled' => true,
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis' => array(
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0.0,
  ),
);

I have found several topics with the error “Nextcloud is not installed…”, however none of the solutions offered resolved my issue.