Published 1 week ago by abdoelsayed2016
iam using PHP 7.0.27 (cli) (built: Jan 23 2018 09:07:32) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
when build cron job that error appear Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in /path_to_project/artisan on line 31 X-Powered-By: PHP/5.3.29 Content-type: text/html
PHP 5.3.29 (cli) (built: Nov 13 2017 09:44:03)Copyright (c) 1997-2014 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd., and with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
You clearly do not have the same PATH variable whenever cron runs that you in your session at the command line.
Do you have
php70-cli as a command? Can you get the full path to this command, and use that in the cron job:
/path/to/php70-cli /path_to_project/artisan schedule:run >> /path_to_project/log.txt