*New 12.1 series Release:
2019-11-08: XigmaNAS 12.1.0.4.7091 - released!

*New 11.3 series Release:
2019-10-19: XigmaNAS 11.3.0.4.7014 - released


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

Need help with Owncloud background job and Cron

Webserver service.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
stephane
NewUser
NewUser
Posts: 10
Joined: 18 Apr 2014 18:39
Status: Offline

Need help with Owncloud background job and Cron

#1

Post by stephane » 27 Apr 2014 05:51

Hello

I have been banging my head trying to get the Owncloud (6.0.2) background job to be executed by cron instead of Ajax (Owncloud default value); but I have been unsuccessful in making this work.

In the CRON interface, I get a "Failed to execute" message when I click run now. This is what I get when I try the command in Putty:

nas: data # php-cgi /mnt/data/owncloud/cron.php
X-Powered-By: PHP/5.5.8
Content-type: text/html
Notice: Undefined index: SCRIPT_FILENAME in /mnt/data/owncloud/lib/base.php on line 103
Notice: Undefined index: SCRIPT_NAME in /mnt/data/owncloud/lib/private/request.php on line 122

The script runs fine when called by a browser. My understanding is that the variables are not set when the cron.php is not called by a browser, as it is the case with cron. So any idea how i can correct this? I can obviously leave the default as is, but this is not the recommended way...

Thank you for your help

nonparity
NewUser
NewUser
Posts: 1
Joined: 01 May 2014 17:22
Status: Offline

Re: Need help with Owncloud background job and Cron

#2

Post by nonparity » 01 May 2014 17:24

I am having the same issue.

To add a bit to this however if I run the cronjob manually from within terminal (php -f /home/cloud/public_html/cron.php) it works fine but running it via a cronjob gives the errors below

[01-May-2014 12:00:01 UTC] PHP Notice: Undefined index: SCRIPT_FILENAME in /home/cloud/public_html/lib/base.php on line 103
[01-May-2014 12:00:01 UTC] PHP Notice: Undefined index: SCRIPT_NAME in /home/cloud/public_html/lib/private/request.php on line 166

miGi
NewUser
NewUser
Posts: 3
Joined: 06 Feb 2013 12:14
Status: Offline

Re: Need help with Owncloud background job and Cron

#3

Post by miGi » 08 Aug 2014 13:26

Hello. I got it working using owncloud 7.0.1 webcron and wget.

Just make new cronjob to call:
/usr/local/bin/wget --no-check-certificate -qO /dev/null "https://--ip/localhost--/owncloud/cron.php"

If you dont use ssl --no-check-certificate, won't be necessary

Post Reply

Return to “WebServer”