- Cron Job Setup:
→ Firstly search for "Cron Jobs" option and go inside the section from cpanel.
→ Following image will give you an idea of finding cron jobs options.
→ Secondly inside "Cron Jobs" section add /path_to_php_folder / your_project_root_folder /artisan schedule:run 2>&1 command, which will run every minute. To run cron job in every minute, please select "Once Per Minute" option from "Common Settings" dropdown above. You have to replace " /path_to_php_folder" with the php folder location in your server and "/ your_project_root_folder /" with the location of your project root folder. Which will look like following image.
→ After successfully adding the command your cron job will look like following.
* | * | * | * | * |
/usr/local/bin/php /your_project_root_folder/artisan schedule:run 2>&1
|
→ For example if users project's root directory looks like the following image
* | * | * | * | * |
/usr/local/bin/php /home/okta63223393/public_html/artisan schedule:run 2>&1
|