Cron error
Every night at 0:00 I get the following cron error
PHP Fatal error: Class 'Magento\SalesRule\Crone\AggregateSalesReportCouponsData' not found in /var/www/html_dev/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 97
I have the same issue on a 2.0.2 install as well as a clean dev install
After installation the following commands have been issued:
composer update php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy en_US nl_NL php bin/magento indexer:reindex php bin/magento cache:clean php bin/magento cache:flush
I run the cron as follows:
*/1 * * * * php -c /etc/php.ini /var/www/html/bin/magento cron:run > /dev/null */1 * * * * php -c /etc/php.ini /var/www/html/update/cron.php > /dev/null */1 * * * * php -c /etc/php.ini /var/www/html/bin/magento setup:cron:run > /dev/null
So any errors will be mailed to the system owner.
Error mail is issued only once every day.
Internal ticket MAGETWO-50633
Hi @thomvanderboon, there was a typo in SalesRule module's crontab.xml and it has been fixed in the develop branch (https://github.com/magento/magento2/commit/af80f15a49fc0a77f32ad906cae78e3c93375934#diff-fe2887919970f52be8c36f474e625585). It is not in 2.0.2 yet but will be available in future versions.
Due to the "huge" change in the code, I manually patched both my 2.0.2 and development branch using vi :)
Do I have to close this issue, or will it be closed when the solution is available in 2.0.x?
I think it is best to close it, since solution is already in the develop branch. We have marked it to be ported to 2.0.x.
After manually patching the files. I still got the error messages (both on dev and 2.0.2). Do I have to recompile magento?
Furthermore I noticed that there are quite some error records in the cron_schedule table. Do I have to clear the errors in cron_schedule table manually?
Please try cleaning cache. Yes, you will need to clean the records manually.