1

I want to run Cron job to reindex indexer in Magento 2. Please provide the solution with a code.

1

You can run the following command from CLI form the bin directory:

./magento cron:run
1

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

Goto the cli

cd /Applications/MAMP/htdocs/magento/bin/

>./magento indexer:reindex

Output

Design Config Grid index has been rebuilt successfully in 00:00:01 Customer Grid index has been rebuilt successfully in 00:00:02 Category Products index has been rebuilt successfully in 00:00:04 Product Categories index has been rebuilt successfully in 00:00:00 Product Price index has been rebuilt successfully in 00:00:13 Product EAV index has been rebuilt successfully in 00:00:03 Catalog Search index has been rebuilt successfully in 00:00:10 Stock index has been rebuilt successfully in 00:00:01 Catalog Rule Product index has been rebuilt successfully in 00:00:09

Catalog Product Rule index has been rebuilt successfully in 00:00:00

and then


./magento cron:run

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.