I'm using Magento 2.3, Here when create bulk action from product grid schedule not started and updated. I got solution for the above issue when I run this command above issue fixed. So I want to run this command or every minutes,

php bin/magento queue:consumers:start product_action_attribute.update --max-messages=20

Is there any way to run this command pro-grammatically from my controller?

Thanks in advance.

  1. Connect to your web server using ssh
  2. Locate your current PHP CLI path by run command:

    which php

On my ubuntu server, the output is:

  1. Open crontab setting by run command:

    crontab -e

The crontab is just like a text file, every line is a job will run with a schedule. For example:

The part 45 3 * * * is time schedule. That says the script will run at 3:45 every day. You can visit https://crontab.guru/ to learn about the time schedule, and set your own time.
  1. When you're done setting the cron, just hit ESC and wq to save your cron just like a text file.

Finally I got solution. Just I enabled cron_consumers_runner from app/etc/env.php. Default cron_consumers_runner is false, Just i changed true.

'cron_consumers_runner' => [ 'cron_run' => true, 'max_messages' => 10000, 'consumers' => [ ] ],

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.