1

I have a store with 300k products, I set up the reindex to be "Update by Schedule",

But I don't know what is the best way for reindexing, Should I do this manually by SSH command every 24 hours by this command

php bin/magento indexer:reindex

Or I have to set up a cron job to do reindexing. if i set up the cron job what is he good period.

My concern is, if I set up a cron job each 1 hour, Reindexing takes about 30 minutes to finish, in this case, every one hour I will be blocked for 30 minutes.

Anyone can help me at this point, What I have to do?

2

Starting with version 2.2, Magento creates a crontab for you. they add the Magento crontab to any configured crontab for the Magento file system owner. In other words, if you already set up crontabs for other extensions or applications, we add the Magento crontab to it.

based on this article on Magento website

http://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-cron.html

you only need to install the cronjob by this command

php bin/magento cron:install --force

The first command in the cron list (magento cron:run) reindexes indexers and your data will always be up to date.

this helped me a lot of understanding indexing via cron job, I hope it will help other people

  • is it safe to reindex via cron job? will it have any bad effect on my website data? – Chintan Kaneriya Feb 23 at 4:14
  • Yes, just be sure to put the indexes to be (re-index by schedule), but this is the best way if you have many administrator working on the same time – WISAM HAKIM Feb 23 at 15:47

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.