How to run artisan command schedule:run on hosting server? (Laravel)

前端 未结 3 2023
忘掉有多难
忘掉有多难 2020-12-31 02:02

I have statusUpdate.php file in the xampp\\htdocs\\project\\app\\Console\\Commands folder.

statusUpdate.php :



        
3条回答
  •  一个人的身影
    2020-12-31 02:36

    Well. I am giving you the answer as per what you have said.

    Cron job command is like this : php /path/to/artisan schedule:run 1>> /dev/null 2>&1

    The path should be locating the artisan file in the server. Like this:

    Let's say your artisan file location is /var/www/artisan, then the simple answer could be do like this:

    php /var/www/artisan schedule:run 1>> /dev/null 2>&1

    Just check if that works. Thank You!

    UPDATE:

    http://i.imgur.com/wVAWAHK.png

    This is how it should look like.

提交回复
热议问题