SSH into your server and navigate to the root directory of your Laravel application.
Run the command crontab -e to open the cron tab editor.
If you want to run cron in every minute then :
Add the following line to the editor: * * * * * php /path/to/your/laravel/installation/artisan schedule:run >> /dev/null 2>&1
Save and exit the editor.
This will run the Laravel task scheduler every minute.
Note: You should replace the /path/to/your/laravel/installation/ with the actual path of your laravel installation in the server.
Alternatively, you can also add the cron job using the cron command. You can do this by running the following command:
* * * * * cd /path/to/your/laravel/installation && php artisan schedule:run >> /dev/null 2>&1
This will change the current working directory to your laravel installation and runs the schedule:run command every minute.
If you want to run cron in every day:
You can also verify that the cron job is running correctly by checking the logs of the cron jobs, usually located in the /var/log/cron or /var/log/syslog directory.
It is not necessary to set up a cron job in the cron tab when using Supervisor to manage your Laravel task scheduler.