I have installed Nextcloud 25 on apache running on Ubuntu 20.04 server
everything looks good but the cron is not working
I have configured everything as Documentation
Please help me to solve this issue
I have installed Nextcloud 25 on apache running on Ubuntu 20.04 server
everything looks good but the cron is not working
I have configured everything as Documentation
Please help me to solve this issue
Can you run this from command line?
sudo -u www-data php -f /var/www/nextcloud/cron.php
(that is the command the cronjob will run, executing on the command line will directly show the errors)
It would really help if you fill out the support post template. Otherwise it’s hard to do much beyond tell you to re-check your work.
Dear Karl,
I have followed all the procedure as per the documentation but I am not be able to find the solution of this issue
It says that you don’t have APCu. Did you install it?
Dear tflidd,
I have installed APCu and configured on the config.php also
please find the snapshots for the reference
Did you enable apc inside php.ini as well?
Can you verify that apc / apcu is correctly installed? please check php -m
to check installed php modules.
Dear Michael,
Please find the output
What does your cron job look like?
depending on your distro cron does not have a full environment. try using the full path to the php-executable in the cronjob; on debian it’s /usr/bin/php
GOOD LUCK!
Thank you for the response…
I see that you have write in your php.ini apc.enable_cli = 1 with blank spaces. Have you try it without those blank spaces?:
apc.enable_cli=1
Also, this could be a stupid question, but have you upgrade your php version? In my case, I was having an issue with cron after upgrading from php 7.4 to 8.0 and I solved it using the command like:
*/5 * * * * php8.0 -f /var/www/nextcloud/cron.php
instead of:
*/5 * * * * php -f /var/www/nextcloud/cron.php
I hope it helps.
Shouldn’t the cronjob be executed as www-data user?
Something like sudo -u www-data php /var/www/nextcloud/cron.php
Thank you all!!!
My issue has been resolved.
I have made a changed a bit and it have me full resolution
This tip was in one of the notes in the documentation:
https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/background_jobs_configuration.html#cron
Therefore it is important to give all the details in the beginning, I though you have already tried that…
Sorry i am new in this and i thought it was optional