New installation. Cron, script errors

I just installed Nextcloud on my 'nix shared hosting server. I managed get to clear all the warnings. PHP is dialed in, security is good, caching set up. Just a couple of problems remain. I created a cron job in my cpanel (see The output of the command is sent to me by email. At first the result was
But as soon as I changed the “Background Jobs” option (in Admin panel) to “Cron” (which I’m supposed to right?) then the output changed to this:
{“data”:{“message”:“Backgroundjobs are using system cron!”},“status”:“error”}
Also, since I set cron, I’ve been getting errors in my Nextcloud log. They say:
Error PHP Undefined index: SCRIPT_FILENAME at XXXXXXXX/public_html/cloud/lib/base.php#141
Error PHP Undefined index: SCRIPT_NAME at XXXXXXXXXX/public_html/cloud/lib/private/AppFramework /Http/Request.php#719
What is going on?

base.php, Line 141:

Request.php, Line 719:
$scriptName = $this->server[‘SCRIPT_NAME’];

You can try if you have a different php cli-binary that works (especially on hosting servers, they sometimes have different settings):

There was a report on the bug tracker:

1 Like

I changed the cron command from “php -f /path/cron.php” to " /usr/local/bin/php -f /path/cron.php ".
It seems to have done the trick. Thanks for pointing me in the right direction.

1 Like