SunYan
1
My Nextcloud say:
Last Cron-Job-Run: 15 Days ago. Check the background job settings
I use Nextcloud 23 and PHP version 8.0
The Server logs say that the CRON jobs is running.
Mar 30 12:25:01 homesrv CRON[22343]: (www-data) CMD (php -f /var/www/nextcloud/cron.php --define apc.enable_cli=1)
and in the Nexcloud-Logs there is no Error about the CRON jobs…
I use APCu
https://docs.nextcloud.com/server/21/admin_manual/configuration_server/caching_configuration.html#id1
I have set the APCu Settings on ALL php.ini files and on the CRON
apc.enable_cli=1
Have anyone an idea how to solve the problem ?
Best
SunYan
What is the crontab of the user that runs nextcloud?
sudo crontab -l -u www-data
And if you use system cron make sure this is checked.
SunYan
3
The Crontab for www-data is:
*/5 * * * * php -f /var/www/nextcloud/cron.php --define apc.enable_cli=1
And Yes i have Cron selected. I have this problem since i switched to PHP8.0 (i had to becaus of my PasswordManager)
SunYan
4
OMG its working now…
i had to add: the PHP version 8.0 to CronTab…
*/5 * * * * php8.0 -f /var/www/nextcloud/cron.php --define apc.enable_cli=1
Edit:
Now i have everything figured out
- Ubuntu 20.04 LTS
- Nextcloud 23
- PHP 8.0
- APCu (Memmory caching)
The Cronjob # crontab -u www-data -e
*/5 * * * * php8.0 -f /var/www/nextcloud/cron.php
I added this to /etc/php/8.0/cli/php.ini
[APCu]
apc.enable_cli=1
And with this setup/config my Cronjob is working fine.
1 Like