Issue
I'm using the advanced template application of yii2 and i want to create a cron. I could find only little information while googling the subject and so far found that cron jobs should go in the console folder.
my structure:
backend/
.
.
.
console/
models/
Subscriptions.php // my custom table model
.
.
.
controllers/
TimelineController.php
.
.
.
I don't know where to go from now or how to proceed? How can I run the cron?
LAMP environment.
Solution
ok i had to navigate to the root of the project in the terminal, there exists a script named yii, i used the following command to run the cron:
php yii cronName.
for example a cron controller named FirstController should be run like this:
rootFolderName/ php yii first
Answered By - tareq Answer Checked By - Terry (WPSolving Volunteer)