Magento – cron_schedule table is not getting populate magento2

cronmagento2transactional-mail

I am not getting transaction mails. I think it's because of cron job,cron_schedule table is not getting populated

Best Answer

You need to setup crontab on your server

crontab -u magento_user -e

Insert

* * * * * <path to php binary> <magento install dir>/bin/magento cron:run | grep -v "Ran jobs by schedule" >> <magento install dir>/var/log/magento.cron.log
* * * * * <path to php binary> <magento install dir>/update/cron.php >> <magento install dir>/var/log/update.cron.log
* * * * * <path to php binary> <magento install dir>/bin/magento setup:cron:run >> <magento install dir>/var/log/setup.cron.log

path to php binary is the absolute file system path to your PHP binary

magento install dir is the directory in which you installed the Magento software; for example, /var/www | grep -v "Ran jobs by schedule" filters this message from the log, making any errors easier to spot The first command (magento cron:run) reindexes indexers, send automated e-mails, generates the sitemap, and so on. Usually it’s associated with the PHP command line .ini file. The other two commands are used by the Component Manager and System Upgrade.

You can find more information here:

http://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-cron.html

Related Topic