Error When Trying To Export Data Feed By Using Cron Jobs

I created a data feed and want to export it by using cron job. After creating data feed I used the code below in cron jobs at cPanel:


php /home/usernameexample/public_html/admin.php --dispatch=exim.cron_export --cron_password=xxxxxxxxxx





But when it operates, it gives errors below (I see at email):





PHP Warning: next() expects parameter 1 to be array, null given in /home/usernameexample/public_html/app/Tygh/Bootstrap.php on line 331
PHP Fatal error: no permissions in Unknown on line 0
Status: 500 Internal Server Error
X-Powered-By: PHP/5.4.29
Last-Modified: Fri, 04 Jul 2014 08:46:01 GMT
Content-Type: text/html; charset=utf-8
Set-Cookie: sid_admin_6d108=dce92e4d70ba61619b723bab3d385c3d_A; expires=Fri, 18-Jul-2014 08:46:01 GMT; path=/; domain=.websitename.com; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache




The setting I use in data feed:



[color=#333333]Server directory: [/color]/home/usernameexample/public_html/datafeed

[color=#333333]Export by cron to: “Server” selected[/color]



Do you have any idea why I am getting this?

I fixed it by using the code below.



in cron job at cPanel

wget -q "https://www.sitename.com/admin.php?dispatch=exim.cron_export&cron_password=xxxxxxxx" > /dev/null



It's working.