Hot answers tagged

96 votes

New order email confirmation not being sent

Starting with Magento 1.9.1 the emails are not being sent directly during checkout but instead are being queued. The queue is being processed via your Magento cronjob - please ensure this has been set ...
48 votes
Accepted

Why does Magento 2.1.2 cron:run gives Undefined index: jobs?

In my case it was caused by some cron jobs migrated from Magento 1, in core_config_data. Magento 2 expects the format to be crontab/{groupname}/jobs/{code}, while the imported ones miss the group name ...
  • 626
35 votes
Accepted

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry - Magento 2

Entry key '4639-168-1-283-4639', where 4639 is product_id, 168 is attribute_id, 1 is store_id, 283 is attribute_value_id for which is getting this issue. So if suppose attribute 168 type is varchar, ...
32 votes
Accepted

Which cron script is best to run? cron.php or cron.sh

It would be best to run cron.sh As of Magento EE 1.13.x and CE 1.8.x, the cron mechanics have changed where Magento has introduced a new scheduling mode function. There are 2 available modes: 1. ...
  • 1,732
31 votes

New order email confirmation not being sent

There are 2 methods to send mails from our Magento 1 store. By Using cron By Avoiding cron If you want to avoid cron : Open your order.php file at app/code/core/Mage/Sales/Model/Order.php Line#...
29 votes
Accepted

Magento 2 - Error on running update/cron.php

I finally figure out the issue. I have to run composer install at <magento_dir>/update/.
  • 4,189
25 votes

Magento 2 run a specific Cron without cron:run CLI command?

On option to save in the development time would be to use N98MageRun for Magento 2. This has the wonderful commands sys:cron:list and sys:cron:run. Using these commands you will be able to find the ...
23 votes

NOT_FOUND - no queue 'async.operations.all' in vhost '/' : RabitMQ : Magento 2.3 EE

Make sure that app/etc/env.php queue array is configured like in Magento's docs. Run bin/magento setup:upgrade which will create the queues if not already created. use bin/magento queue:consumers:...
22 votes
Accepted

Magento 2 : Execute Cron

You don't need the brackets when you run the command so you should run: sudo php bin/magento cron:run --group="customgroupname_cron"
21 votes
Accepted

Difference between cron:run and setup:cron:run

cron:run is responsible for the indexers and all other normal Magento scheduled tasks. setup:cron:run is responsible for running setup operations for the Web Setup Wizard. If you use the web setup ...
20 votes

New order email confirmation not being sent

i removed the following mail queue code from Template.php , then i started receiving email when the order is placed by customer or when i click send email from the admin panel "Sales/Orders" tab. ...
19 votes
Accepted

Magento 2 run a specific Cron without cron:run CLI command?

Think simple! The Cron class is a "normal" class. We can use a Playground to test our Cron: How can I bootstrap Magento 2 in a test.php script?. The Object Manager will create our Cron Object. And ...
15 votes
Accepted

Magento not sending order confirmation emails to admin

Try a workarround: in CMS > SALES EMAILS Set Order > Sent Emails via seperate Mail (BCC is Buggy) Magento know this bug and will fix in 2.0.
15 votes

How to make sure your Magento 2.0 cron job is running

Truncate the cron_schedule table and see if it gets re-populated with scheduled tasks after a few minutes. Rough, I know, but should give you an answer. Also, maybe it's worth doing this on a ...
14 votes

New order email confirmation not being sent

There two solution as follows: Solution-01: Using cron System > Configuration > Advanced > System > Cron The default settings are: First of all, Magento 1.9+ relies completely on cron jobs to send ...
  • 1,448
14 votes
Accepted

Setting up cron to run every 30 minutes

The Current cron expression you have added <cron_expr>0 4 * * *</cron_expr> will run every day at 04:00 AM next at 2017-03-23 04:00:00 then at 2017-03-24 04:00:00 then at 2017-03-25 04:00:...
  • 7,392
13 votes
Accepted

Magento 2: New added products not showing

In Magento 1, after every product uploaded, you need a re-index required. In Magento 2 to run the Reindex, you should setup the cron job. If you want reindex immediate then you should run php bin/...
  • 1,296
12 votes
Accepted

Set cron for Reindex (specific) indexes

To reindex all indexes: php -f indexer.php reindexall To retrieve a full list of available indexes: php -f indexer.php info Then specify the type of index you would like to reindex like so: php ...
  • 136
12 votes

List cron jobs in Magento 2

You can run n98-magerun2 command line utility to list all cronjobs. If you run the following command in your magento installation, it will display all the cronjobs available in your magento. n98-...
11 votes

Magento 2 cron not working

Flush Cache and Run Cron again. php bin/magento cache:flush php bin/magento cron:run
11 votes
Accepted

Magento 2: how to use a configuration field for the crontab expression?

Following ProductAlerts in M2: <?xml version="1.0"?> <!-- /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <config xmlns:xsi="http:...
11 votes

How to set cronjob dynamic schedule from database in Magento 2

Not as easy as I expected. First you need to update your crontab.xml to setup the config path to your frequency: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
11 votes
Accepted

Magento 2 Could not acquire lock for cron group: default

In our case the issue was caused by a hanging cron job. The solution was to kill the cron job then everything returned to normal. https://help.nexcess.net/magento/how-to-find-and-remove-hanging-...
10 votes

New order email confirmation not being sent

Just install the "SMTP Pro Email" extension: http://www.magentocommerce.com/magento-connect/smtp-pro-email-free-custom-smtp-email.html Fill in with your Custom SMTP details and done. This took me ...
  • 124
10 votes

New order email confirmation not being sent

With Magento 1.9 all the emails will be queued and later send through Cron. Magento 1.9 Release Note If you want your Transaction Emails to be sent through Cron, you can set the cron from from ...
10 votes

Magento 2 : Execute Cron

I merged the other answers from this post a bit - so that only one file is needed, and cron jobs can be run via browser or command line. Usage via command line: php cronLaunch.php "Vendor\Module\...
  • 1,117
10 votes
Accepted

Magento 2: How to set cron for reindex in SSH in magento 2?

You can launch reindex a separate index as independent process, like: * * * * * /usr/bin/php /Users/uchuhlebov/web/m212/www/bin/magento indexer:reindex catalog_category_product >> /Users/...
10 votes
Accepted

Magento 2: CronJob bug? MySQL is always running at 30% usage and many php processes are running

My best guess, See this at stackexchange and this at github. The issue somehow appears as some cronjobs aren't indicated as completed. It freaked me out for quite some time. The quick diagnosis to ...
9 votes

Magento not sending order confirmation emails to admin

Three days were spent investigating and addressing those hiccups, and I can now share my newly found knowledge of the possible problems arising from updating Magento to 1.9. First of all, Magento 1.9+...
9 votes
Accepted

Custom module cron job not running

You need to do one of the following options: 1) Use <group id="default"> in vendor/module/etc/crontab.xml or 2) Create your own vendor/module/etc/cron_groups.xml with the following: <?...
  • 106

Only top scored, non community-wiki answers of a minimum length are eligible