Setting up the Magento cronjob (Magento 2)

From XTENTO Support Wiki
Jump to: navigation, search

This is a guide for Magento 2. For Magento 1 extensions and guides, please refer to Magento 1 Guides.

Please refer to the official Magento 2 documentation on how to set up the Magento cronjob: http://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-cron.html

Troubleshooting

n98-magerun2: No job config found!

n98-magerun2 does not support cronjobs defined only via the database in core_config_data. These are perfectly fine cronjobs though. You just can't run them using n98-magerun2.

Stalled Cronjobs / No cronjobs scheduled

Please note you will ONLY see entries in the import/export execution log if it actually did something. If 0 orders are exported, or 0 stock level updates got processed, nothing is logged in the execution log.

Possible solutions for common cron issues:

* * * * * or */5 0 * * * or 0 0 * * *

An invalid cron expression could look like this for example: * * * * * * (Too many parameters - must be 5 exactly) or 00 02 * * * (5 parameters, but hour/minute must be specified using single digits, so 0 and 2 instead of 00 and 02)

Personal tools
Namespaces
Variants
Actions
General Information
Magento 2 Guides
Magento 2 Extensions
Magento 1 Guides
Magento 1 Extensions
Magento Integration Suite
Product Feed Guides
Toolbox