Hello! One of my ISPconfig servers (ISPconfig 3.0.5.4p9 with Apache, Debian 8, PHP7) is running ownCloud 8.2 on one of it's domains. Everything works just fine. I just want to setup ownCloud's cron job in ISPconfig instead AJAX scheduling method. ownCloud's documentation states that I should call for '/var/www/owncloud/cron.php' (in my case '/var/www/clients/client1/web3/web/cron.php') as the 'default web server user (often, www-data or wwwrun)'. I'm confused as the owner of the files in folder '/var/www/clients/client1/web3' is 'web3' user. What should I put in 'Command to run (commands are executed via sh, urls via wget)' field on Cron Job page in ISPconfig?
You should alwaysuse the fullpth to a command in cron, so the command is e.g. /usr/bin/php -q /var/www/clients/client1/web3/web/cron.php
Thank you for clarifying. What about the user? Should I add the cron manually (in cron.d as 'root') or via ISPconfig's interface (as 'web3')?
No joy. Should be every 15 minutes. I've done as you suggested. The path is correct. Could it be that the path to php is not '/usr/bin/php' for php7?
Check with: which php and you should check if the file /var/www/clients/client1/web3/web/cron.php is maybe a shell script and starts already with "#/usr/bin/php", in this case, you run it just with: /var/www/clients/client1/web3/web/cron.php without prepending the PHP interpreter.
Thank you. which php returns /usr/bin/php So that seams to be good path. This is the content of /var/www/clients/client1/web3/web/cron.php http://paste.ofcode.org/cSn4KJwG7kVeSb9u7ujh6A I understand that you are not support for ownCloud but could you, please, help me out.
The command: /usr/bin/php -q /var/www/clients/client1/web3/web/cron.php should be ok then. Please ensure that this cronjob is not jailed, it has to be a full cronjob. as alternative you can try if this is allowed to run from a browser, if that's the case, then just enter the url starting with http://......./cron.php in the command field of the cronjob.
Could it be /opt/php-7.0.0/bin/php -q /var/www/clients/client1/web3/web/cron.php Since I followed this tutorial to install PHP7: https://www.howtoforge.com/tutorial/install-php-7-on-debian-8-jessie/
I'm not sure how to check that. When I switch to webcron in ownCloud and setup path in ISPconfig like this: https://domain.com/cron.php It appears that it still doesn't run (screenshot bellow) But when I go to 'https://domain.com/cron.php' using browser, iz says: '{"status":"success"}' and 'Last cron job execution: seconds ago.' in ownCloud. So, if the cron from ISPconfig works, it should report so in ownCloud, right?
Thats an additional PHP version, if you want to run the cron with php 7 and not php 5, then you have to use this path. But ensure that its a full cron and not jailed cron! Does it work when you run: wget https://domain.com/cron.php on the shell? Or do you get an ssl certificate error?
wget https://domain.com/cron.php on shell comes up with a certificate error. I managed to sort it out by creating cron like this: Code: */15 * * * * root wget --no-check-certificate -O /var/log/owncloud_cron https://domain.com/cron.php It is 'dirty' because doamin.com is hosted on the same server but al least it works.
Could be your server wget path under Server config under CentOS it was under /bin/wget rather than the define /usr/bin/wget