In Magento 2 there are three commands that should be set up as cronjob
* * * * * <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
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.
Source: http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html
If I understand the docs correctly, update/cron.php
and bin/magento setup:cron:run
are only used for module installations and updates from the admin panel.
This is something that does not happen in a properly deployed production system where all updates are at least done on a staging system first, then moved to production.
So is there any reason to set up these cronjobs? What changes if I leave them out?
update/cron.php
?update
directory is not in the GitHub repository, also can't find it invendor
, composer installs it out of nowhere it seems.