How to run cron in Magento 2.0

Magento Recommends 3 type of cron are introduced in magento-2 as given below

*/1 * * * * php -c /path/to/magento2/bin/magento cron:run
*/1 * * * * php -c /path/to/magento2/bin/magento/update/cron.php
*/1 * * * * php -c /path/to/magento2/bin/magento setup:cron:run
but we do not need to configure all of them ,

1st cron command will work for reindexes indexers, send automated e-mails, generates the sitemap, and so on.

rest 2 cron commands are used by the Component Manager and System Upgrade.

To congfigiure CRON, edit crontab command line

Code:
crontab -u magento_user -e
add this line at the end of file

Code:
* * * * * php -c /path/to/magento2/bin/magento cron:run
# this will run every minute
if you do not want every minute you can set every 5 min as given below:

Code:
*/5 * * * * php -c /path/to/magento2/bin/magento cron:run
Posted

Leave a Reply