php - laravel cron job not working
Get the solution ↓↓↓Solution:
First of all Welcome to StackOverflow. Yes your command is wrong... You want to run a scheduled command within the application console kernel, not scheduling a command execution. Please read the Laravel official documentation about Task scheduling (and maybe also the cron wiki).
You're simply telling to the CPanel crontab to run the commandcheckCommissions:check_commissions
everyday at midnight but in your scheduler you want to run that command every minute.
First of all you have to update your cronjob from
0 0 * * * /usr/local/bin/php /home/gridtumg/public_html/tree/local/artisan checkCommissions:check_commissions >> /dev/null 2>&1
to
* * * * * /usr/local/bin/php /home/gridtumg/public_html/tree/local/artisan schedule:run >> /dev/null 2>&1
In order to start the scheduler. Then laravel will handle the rest.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: the payload is invalid.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.