3

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

1
  • How about deleteing all rows in cron_schedule table? Commented Jan 23, 2017 at 22:20

1 Answer 1

4

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 agree to our terms of service and acknowledge you have read our privacy policy.

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