what is your OS? Raspbian on Raspberry Pi 3 B+ what is your web server user? www-data what exactly did you configure? created files nextcloudcron.service and nextcloudcron.timer based on the admin guide for NC14 what exactly doesn’t work? Cron jobs not running how did you try to solve the problem already? I followed the guide and still not running every 15 minutes.
I was actually hoping you provide some additional information as well and not only answers to my questions.
Anyway, more questions:
Did you create the cron job for the www-data user?
Which command did you use to open the cron editor?
Which command line did you enter as cron job?
Did you try to run that command line manually (as user www-data) and did it finish successfully?
Are there any error messages in the journal/ system logs regarding the cron execution?
Do other cron jobs run successfully or is cron not implemented correctly?
Update
Sorry, I assumed cron job, but you configured a service. Please check if the service is running and triggered successfully then. Logs are required nonetheless. We need the information what exactly fails.
hi Schmu, what did was follow the Admin guide on the cron jobs and created them as stated there.
i did this same steps for NC13 and those were working normally.
i just tried the following:
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start ‘nextcloudcron.timer’.
Multiple identities can be used for authentication:
, (pi)
root
Choose identity to authenticate as (1-2): 2
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to start nextcloudcron.timer: Access denied
See system logs and ‘systemctl status nextcloudcron.timer’ for details.
root@rpi3-cloud:/home/pi# sudo -u www-data systemctl enable nextcloudcron.timer
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files ===
Authentication is required to manage system service or unit files.
Multiple identities can be used for authentication:
, (pi)
root
Choose identity to authenticate as (1-2): 2
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to enable unit: Access denied
root@rpi3-cloud:/home/pi#
also i did this:
root@rpi3-cloud:/home/pi# sudo -u www-data php -f /var/www/html/nextcloud/cron.php
root@rpi3-cloud:/home/pi# sudo -u www-data php -l /var/www/html/nextcloud/cron.php
No syntax errors detected in /var/www/html/nextcloud/cron.php
root@rpi3-cloud:/home/pi#
Also, after running systemctl start nextcloudcron.timer and systemctl enable nextcloudcron.timer as root i dont get any error messages
this is what i get after running systemctl status nextcloudcron.timer
root@rpi3-cloud:/home/pi# systemctl status nextcloudcron.timer
● nextcloudcron.timer - Run Nextcloud cron.php every 15 minutes
Loaded: loaded (/etc/systemd/system/nextcloudcron.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Sat 2018-10-20 23:44:26 CDT; 1 day 11h ago
Oct 20 23:44:26 rpi3-cloud systemd[1]: Started Run Nextcloud cron.php every 15 minutes.
but i dont see it running every 15 minutes. currently its been more than 30 minutes and not running
I have same issue with cron.php job. So I worked out that by default nextcloud installation ships with wrong owner permissions for cron.php It must have execute by owner.
That sounds strange. At least with NC13 there’s no need for cron.php to be executable. Php engine executes it (php -f). Is it possible that your php command is not found when crontab executes it?
Did you try /path/to/php -f instead of just php -f?
Or call php-cli instead of php.
There should not be anything executable which are not really meant to be executable.