I use this cron script in Scheduler (by root):
sudo -u http /var/packages/PHP7.3/target/usr/local/bin/php73 -c /usr/syno/etc/packages/WebStation/php_profile/11e7abb1-d10e-43cfb/conf.d/user_settings.ini -f /volume1/web/nextcloud/cron.php
You need to replace paths to php, profile and nextcloud folder
I have tried to setup the NewsUpdater as suggested and keeps giving me errors.
Running Nextcloud 18.0.4 ON DSM 6.2.3
and the error I am getting is:
PHP Warning: PHP Startup: Unable to load dynamic library ‘mcrypt.so’ (tried: /usr/local/lib/php72/modules/mcrypt.so (/usr/local/lib/php72/modules/mcrypt.so: cannot open shared object file: No such file or directory), /usr/local/lib/php72/modules/mcrypt.so.so (/usr/local/lib/php72/modules/mcrypt.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘mysql.so’ (tried: /usr/local/lib/php72/modules/mysql.so (/usr/local/lib/php72/modules/mysql.so: cannot open shared object file: No such file or directory), /usr/local/lib/php72/modules/mysql.so.so (/usr/local/lib/php72/modules/mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Console has to be executed with the user that owns the file config/config.php
Current user: http
Any pointers of what is happening? Aprt that it does not see 7.2 and I don’t want to upgrade the PHP 5.6. It has 7.2
Hi Belyache, sorry for my question that will look stupid to you, but root cannot access cron.php via docker.
So I tried to run the same task as you with: docker container exec --user www-data -it nextcloud.domain php cron.php
Even if it works in ssh, it does not via the task scheduler (root).
Do you have an advice on how to trigger the php cron.php job within docker?
I don’t have any experience interacting with docker instances.
I tried a program about a year ago that used Docker, but I found it to be troublesome as I couldn’t really modify it from the original conifg. However, that could have been the specific program that was using Docker at that point.
Hi SimyriK, I have been struggling with this for some time now and can’t get the cron Job to work properly. I have installed NC 20.0.7 on my Synology Disk Station and am now trying to do the cleanup work from the installation. Pretty much the last thing to take care of is cron and that simply doesn’t work.
I found this setting: sudo -u http php73 /var/services/web/Nextcloud/cron.php
That didn’t work. Now I’ve been trying yours but can’t figure out how to adapt it to meet my folder/user structure. Can you help?
I tried that also (have the same problem) and it seemed to have worked once. NC gives me the warning “last task was carried out 12 minutes ago”. So I figure it must have worked once, right? Problem is now that it doesn’t seem to repeat every 5 mins as I set it up in the Syn task planner.
First, you need to determine which version of PHP you are using - this can be found in WebStation in your DSM. Next, if you connect to synology via SSH, find the path of the executable file /var/packages/PHP_YOUR_VERSION/target/usr/local/bin/php_your_version: