M
M
Maxim Lagoysky2017-06-06 16:24:45
Yii
Maxim Lagoysky, 2017-06-06 16:24:45

How to run cron on beget.com?

Good evening everyone.
How to run cron on beget.com. The project on yii2, created the user module in it there is UserController in the controller there is actionCronpopular. There is a scheduler on the hosting itself, I try to register it there,
/usr/bin/php ~/mysite.ae/yii user/cronpopular
but something goes wrong and the error "Unknown command: user / cronpopular" crashes.
Can you tell me how to write correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2017-06-08
@lagoy

The problem is that you are using controllers inherited from yii\web\Controller which are not suitable for console applications, because they are created exclusively for applications that have a web interface. To solve the problem, you need to fix this error

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question