Reputation: 19
I have php script ran by cron. When I manually run
php /var/www/html/ngix/hotshoponline.com/api/artisan schedule:run
it works fine, the script takes about 2 mins, and I can get the output I need.
But when it's called by cron like this
* * * * * php /var/www/html/ngix/hotshoponline.com/api/artisan schedule:run >> /dev/null 2>&1
it is not working i tried with -f and tried with /usr/bin/php nothing is working
Upvotes: 0
Views: 46
Reputation: 109
In order to see the possible errors, add an output file.
Something like this
* * * * * php /var/www/html/ngix/hotshoponline.com/api/artisan schedule:run > /var/log/error.log 2>&1
Then tail the error.log file to see if there are errors.
tail -f /var/log/error.log
Upvotes: 3