2

I am sure my Magento 2 cron is running. It runs for every 15 minutes. It is not throwing any error.

Below is the cron that is running for every 15 minutes

php -c /opt/alt/php55/etc /home/xxx/public_html/bin/magento cron:run

Every time when it runs it gives the below output.

Ran jobs by schedule.

However the indexers are not building.

When I login at backend It Says

One or more indexers are invalid. Make sure your Magento cron job is running.

I know that the CLI command can be used. My question is why the indexers are not rebuilding when the Cron is running.

Update:

Following is my configuration for index and default

Generate Schedules Every - 15
Schedule Ahead for - 16
Missed if Not Run Within - 60
History Cleanup Every - 20
Success History Lifetime - 120
Failure History Lifetime - 120
Use Separate Process - Yes

Following are the schedules I see in my cron_schedule table

captcha_delete_old_attempts
captcha_delete_expired_images
magento_newrelicreporting_cron
sales_grid_order_async_insert
sales_grid_order_invoice_async_insert
sales_grid_order_shipment_async_insert
sales_grid_order_creditmemo_async_insert
sales_send_order_emails
sales_send_order_invoice_emails
sales_send_order_shipment_emails
sales_send_order_creditmemo_emails
newsletter_send_all
2
  • Sir Did you get the solution??? I'm facing the same issue – Asad Khan Nov 16 '19 at 16:18
  • @malaiselvan, please update the answer if you get the solution. – Sarvesh Tiwari Mar 8 '20 at 13:45
1

Well, indexer_reindex_all_invalid CRON job in Magento has index group. So, go to Admin -> Stores -> Configuration -> Advanced -> System -> Cron -> Cron configuration options for group: index. In that fieldset check what you have in "Schedule Ahead for" field. By default this field has "4" minutes. If you execute cron:run once per 15 minutes this job might be marked as missed. Try to set "16" or more for "Schedule Ahead for" and wait for some time. Hope it will help.

2
  • Thanks. I updated my question with the current configuration with the schedules that are created. I dont see any schedule created for indexer_reindex_all_invalid – Malaiselvan Apr 24 '16 at 19:04
  • Well, try to run the cron schedule manually for the 'index' group and check if the situation in the cron schedule database table is changed: ./bin/magento cron:run --group=index – Yaroslav Rogoza Apr 27 '16 at 8:56
0

We recommend you run cron every minute. I think this is mostly for updating things like catalog rules but you'll be very unhappy with a 15-minute cron interval if you ever update or upgrade. You should shorten the cron interval.

1
  • My hosting provider a2host is allowing only 15 minutes as minimum for shared hosting. My website got only 2 products and my customer base is very small. I got a cart rule to provide a discount and that is where the index is failing... – Malaiselvan Apr 24 '16 at 19:12

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.