Cron Tab / Nginx + Ubuntu + Laravel Hello I have been trying to make the cron Job in a Ubuntu / Nginx Server , in digital Ocean .
I have tried , many options -
* * * * * php /var/www/laravel/artisan schedule:run 1>> /dev/null 2>&1
* * * * * /usr/bin/php /var/www/laravel/artisan schedule:run 1>> /dev/null 2>&1
* * * * * /usr/bin/php /var/www/laravel/artisan schedule:run > /dev/null >> /dev/null 2>&1
But I was no success, I dont know what I am doing wrong .
The one in the Laravel docs should work;
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
but I use
* * * * * /usr/bin/php /var/www/html/sitename/Live/artisan schedule:run >> /dev/null 2>&1
I also run the cron job under the user account of the web server so that there is no argument about who owns any created files (such as log files). If your cron job runs as root and it creates the logfile (for instance) then the webserver will never be able to write to the log
hello @Snapey , I did like that .
it didnt work
Can you share your console\kernel.php just to make sure that you have scheduled commands the right way.
It is working , sorry . it was my mistake .
Please sign in or create an account to participate in this conversation.