How do find /path/to/artisan ?
artisan
is in your Laravel project root. So, if your project path looks like /home/laravel-proj/
use this:
* * * * * php /home/laravel-proj/artisan schedule:run 1>> /dev/null 2>&1
extending the answer given by @Alexy Mezenin , to get current working directory on ubuntu use pwd command.
For windows user it may be cd
So if you have a project in desktop/blog.go to the blog directory and run pwd
command and you'll get the path to artisan which is /home/user/Desktop/blog
Then you'll use this:
* * * * * php /home/user/Desktop/blog/artisan schedule:run 1>> /dev/null 2>&1
Artisan is located in your project directory. For instance, my crontab shows something like this:
* * * * * /usr/bin/php /var/www/projectfolder/artisan command