Answer the question
In order to leave comments, you need to log in
How to execute cron command in yii2?
Hello, I recently asked a similar question, but could not get an answer. Apparently due to lack of information. I will try to describe in more detail.
I am transferring a site ( yii2 basic ) from a local server to a hosting. I use REGRU hosting , hosting control panel - ISP Manager . Problem - I can not set up the "Task Scheduler" correctly.
On the local server, I ran the command as follows:
//%progdir%\modules\php\%phpdriver%\php-win.exe -c %progdir%\modules\php\%phpdriver%\php.ini -q -f %sitedir%\mysite.loc\yii cron/end-order
/usr/bin/php var/www/u0499712/data/www/mysite.com/yii cron/end-order
Could not open input file: var/www/u0499712/data/www/mysite.com/yii
PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /var/www/u0499712/data/www/myslite.com/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php on line 15
Answer the question
In order to leave comments, you need to log in
The problem was solved by changing the path to PHP
Apparently version 5.3 was used in the past case
I ran into the same problem, I solved it the same way: by writing the full paths
, but I will supplement the comment above, if hosting support is stupid, like Siberian boots, and there is a lot of useful information in the documentation and FAQ, then the path to php can be found from the PHP_BINDIR variable
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question