How to find / way / in / artisan?

Trying to Plan Artisan Teams

https://laravel.com/docs/5.0/artisan

* * * * * php /path/to/artisan schedule:run 1>> /dev/null 2>&1 

Can someone please show me how I know /path/to/artisan ?

+5
source share
4 answers

artisan is at your root of the Laravel project. So, if your project path looks like /home/laravel-proj/ , use this:

 * * * * * php /home/laravel-proj/artisan schedule:run 1>> /dev/null 2>&1 
+3
source

Artisan is in your project directory. For example, my crontab shows something like this:

  * * * * * /usr/bin/php /var/www/projectfolder/artisan command 
+1
source

Extending the answer given by @Alexy Mezenin to get the current working directory on ubuntu, use the pwd command .

For Windows users, this may be cd

So, if you have a project in your desktop / blog . go to the directory on the blog and run the pwd and you will get the path to the artisan, which is / home / user / Desktop / blog . >

Then you will use this:

 * * * * * php /home/user/Desktop/blog/artisan schedule:run 1>> /dev/null 2>&1 
+1
source

On Linux systems: Using terminal> Go to project folder-> run pwd . The path you have to get is the absolute path to your project.

On Windows, I think you need to run cd

-1
source

Source: https://habr.com/ru/post/1258950/


All Articles