baijunyao / laravel-bjyblog

Laravel v9 blog
https://baijunyao.com/docs/laravel-bjyblog
MIT License
525 stars 201 forks source link

crontab -e.... Help please #124

Closed yuri25 closed 4 years ago

yuri25 commented 4 years ago

Please help me ... I receive such reports in the mail /bin/sh: 1: cd: can't cd to /xtty.ru/artisan This is defined in your instructions * * * * * cd /baijunyao.com/artisan && php artisan schedule:run >> /dev/null 2>&1 Probably you need to specify the full path on the server eg: /var/www/user/data/www/mysite.com/artisan && php artisan schedule:run >> /dev/null 2>&1 Right?

baijunyao commented 4 years ago

Sorry, the documentation may be misleading for you, I will update it.
/var/www/user/data/www/mysite.com/artisan is a file, not a directory.
If your site path is /var/www/user/data/www/mysite.com, you should add the following line to the crontab

* * * * * cd /var/www/user/data/www/mysite.com && php artisan schedule:run >> /dev/null 2>&1
yuri25 commented 4 years ago

thanks!