1

My magento cronjob stopped working. It gets executed from system. Checked that in the logs. But magento just shedules the cronjobs and don't execute them. Also the schedule_id of the cronjobs is always 0. Manually run the cron task gives me an execption. See images from cli and database. What could cause this issue ? And how to fix?

PHP 7 on ubuntu Magento 2.1.5

enter image description here

enter image description here

0

As far as I can see this is an open issue for Magento2.x in github. https://github.com/magento/magento2/issues/5836

There are some solutions that some people suggest in the above link such as truncating the cron_schedule table - but I can't be certain as to whether this will work.

0

your cron_schedule table has missing index key. you need to run

ALTER TABLE `cron_schedule`
  ADD PRIMARY KEY (`schedule_id`),
  ADD KEY `CRON_SCHEDULE_JOB_CODE` (`job_code`),
  ADD KEY `CRON_SCHEDULE_SCHEDULED_AT_STATUS` (`scheduled_at`,`status`);
ALTER TABLE `cron_schedule`
  MODIFY `schedule_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Schedule Id';

https://github.com/magento/magento2/issues/21523

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.