ok I had to go to the root of the project in the terminal, there is a script called yii, I used the following command to start cron:
php yii cronName.
for example, a cron controller named FirstController should start as follows:
rootFolderName / php yii first
source
share