I have been using cron on a hosted server (adding the link to cron.php in the webmanager of the hosting account as a cron job).
The server is setup to send an email of the cron job has an error (essentially any output).
I’m expecting the cron job to not have any output when there is no error.
The cron job always throws out a “Please use ./occ system:cron”
ownCloud version: 10.4.1.3
Since the message about using ./occ does not seem to constitute an error, can this be removed from the cron.php?
Thanks. I think what I’m using is Webcron, set to execute ./cron.php every 30 minutes. But the line “echo ‘Please use ./occ system:cron’ . PHP_EOL;” seems to be coded there to run every time, triggering an output and an alert email…
From the code and the documentation I find it hard to figure out what cron.php actually does, so I’m wondering if I can just remove that line…?
Just an update, this works. Almost…
Except I now get an email every 15 minutes “Cron job output: ”.
I guess I might be able to fix that somehow in the shell script, but I could also just send the output to dev/null instead, because I’m not expecting any meaningful feedback from that anyway.
Thanks for the help.