I inherited a Magento project from the previous developer, and the Cron is broken on that server, so no transactional emails are being sent. There are 3-4 months of backed up emails that never sent; if I nuke the old server and migrate to a new instance then it will send 3 months of backed up confirmation and shipping emails. How can I clear all these without sending the emails? The cron_schedule table only has 26 records in it as of right now, all from orders placed today. As I monitor it the records in the table go up and down between about 20 to 30.

Is there any way I can clear all the cron tasks, so when I migrate the project to a new instance I won't spam all our customers with old emails?

Magento 1.9.2.3

  • How about deleteing all rows in cron_schedule table? – Adarsh Khatri Jan 23 '17 at 22:20

There are a few things you can do.

The first thing is to clear the email queue table. The is stored in the core_email_queue table so truncating this table should clear the backlog of emails along with the core_email_queue_recipients table.

You can also disable emails being sent in the Magento admin in System -> Configuration -> Advanced -> System -> Mail Send Settings -> Disable Email Communications and setting this to yes and clearing the relevant caches and then run the CRON and switch it back afterwards to "No".

I would test this locally with one email order to be certain but those 2 things above should clear the email queue for you and prevent any backlog emails being sent to customers (though will also prevent any emails being sent to new orders).

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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