I am building an application in Laravel 5.2 and I am in need to build few CronJobs so I have written a command in my GoDaddy's cPanel like
* * * * * /usr/bin/php -q /home/bharat2016/public_html/artisan schedule:run
Basically I want to write php artisan schedule:run and it's working perfectly fine on my local but it's not running in my GoDaddy Hosting. Is the php path is perfect? P
Please let me know if there needs any other command then this
NOTE:
I have tried * * * * * /usr/bin/php /home/bharat2016/public_html/artisan schedule:run
and * * * * * /usr/bin/php /home/bharat2016/public_html/artisan schedule:run >/dev/null 2>&1
but it's not working.
Any help will be appreciated! Thanks in advance.
/usr/bin/php-cli /home/bharat2016/public_html/artisan schedule:run >/dev/null 2>&1
php-cli needs to be written for accessing php command. I found it after lots of efforts so I want to give it an answer to be useful to other users who might face this issue in future