Message about the background task looking for SSL certificates in Nextcloud

Message:
A background task that looks for SSL certificates imported by the user is still running. Please try again later.

Solution:

Test the cron.php (it should run without errors):
sudo -u www-data php -f /var/www/nextcloud/cron.php

In the basic settings of the Nextcloud web interface switch the basic tasks to cron.

In the configuration file /etc/crontab add the following:
*/5 * * * * www-data php -f /var/www/nextcloud/cron.php

Reload the configuration of the cron:
service cron reload

The cron job will now run every five minutes and there should be no more error messages.