Hi ,
I use basic template and I want to run anyone action with crontab. I installed yii2-scheduling extension.
i created schedule.php file to /var/www/html/basic/config/ as like this.
<?php
$schedule->exec('touch /var/www/html/a.txt')->everyMinute();
?>
I try to create a.txt file every minutes at this command.
After this , I added this line int /etc/crontab
* * * * * php /var/www/html/basic/yii schedule/run --scheduleFile=/var/www/html/basic/config/schedule.php
and I wait it’s work. But not work.
If I run this command on command line “php /var/www/html/basic/yii schedule/run” it is works and a.txt file created. But crontab not work.