How to setup cron in Magento 2
To execute the Magento 2 cron job, use the following code:
1 |
php <path to magento root>/bin/magento cron:run |
If you want to automate the process, add it to /etc/crontab. For instance:
1 |
*/30 * * * * www-data php /var/www/firebear.com/store/bin/magento cron:run |
More tips from Magento 2 Developer’s Cookbook
If you are looking for a tool that allows leveraging crone in import of export processes, check our Magento 2 Improved Import Export module. It adds cron jobs for both processes, and you can use either predefined configuration, or create your own schedule. For further information, follow this link:
Download / Buy Firebear Improved Import / Export Magento 2 Extension