cancel
Showing results for 
Search instead for 
Did you mean: 

Task "Rule processing: 2": 1 item(s) have been scheduled for update.

Task "Rule processing: 2": 1 item(s) have been scheduled for update.

Since creating a cart price rule to allow free delivery over a certain amount, when i generate an order manually in the admin panel i get the message "Task "Rule processing: 2": 1 item(s) have been scheduled for update."

In the Bulk Action Log it shows these rules with the status of "Not Started". These never start, one has been there for over a week with the same status. 

How do i clear this message and prevent it happening again?

I am using Magento 2.4.3-p2. Cron is running and i can find nothing in any logs at the same time as submitting the order to indicate why this is happening.

18 REPLIES 18

Re: Task "Rule processing: 2": 1 item(s) have been scheduled for update.

Hi @CSP_Alex ,

 

Seems like your cron is not working.

Please run manually by executing below command and check again.

 

php bin/magento cron:run

php bin/magento indexer:reindex

 

Problem Solved? Accept as Solution!

 

Hope it helps!

Thanks

Ankit Jasani

Re: Task "Rule processing: 2": 1 item(s) have been scheduled for update.

Hi @Ankit Jasani 

As stated my cron is working, i have tried manually running it and reindexing and that doesnt fix the issue.

When running cron from CLI i get "Ran jobs by schedule." as the output. The cron configurations are default for every group

Re: Task "Rule processing: 2": 1 item(s) have been scheduled for update.

Hi @CSP_Alex ,

 

Try below command and check.

php bin/magento queue:consumers:start async.operations.all

 

Just execute it and don't wait for complete execution.

Treat it like background execution process and check in admin panel.

Your queue will successfully executed.

 

If it works then let me know.

I will provide a way to configure it in env.php

So, it will work automatically next time.

 

Problem Solved? Accept as solution!

 

Hope it helps!

Thanks

Ankit Jasani

Re: Task "Rule processing: 2": 1 item(s) have been scheduled for update.

Hi @Ankit Jasani 

When running that i get "Unknown connection name amqp" as an error on line 43 of ConnectionTypeResolver.php

I have not changed anything else apart from creating this rule.

 

 

In my env.php i have 

'cron_consumers_runner' => [
        'cron_run' => false,
        'max_messages' => 1000,
        'consumers' => [
            'async.operations.all'
        ]
    ],
    'queue' => [
        'consumers_wait_for_messages' => 1
    ],

It looks like async.operations.all can only be used with RabbitMQ, which i believe is installed on my server, but does not look like it was configured, so i will try and configure that if there is not another way.

Re: Task "Rule processing: 2": 1 item(s) have been scheduled for update.

Re: Task "Rule processing: 2": 1 item(s) have been scheduled for update.

Hi @Ankit Jasani 

I have now got rabbitmq configured but when running "php bin/magento queue:consumers:start async.operations.all" the jobs still do not start. I have left it about 10 mins so far with no change.

In the rabbitmq admin panel the connection appears to be open but nothing is happening (no data appears to be transmitted) and the state is "idle"

Re: Task "Rule processing: 2": 1 item(s) have been scheduled for update.

Hi @CSP_Alex ,

 

Have you added queue configuration in your app/etc/env.php?

Like below

 

'queue' => [
'amqp' => [
'host' => 'localhost',
'port' => '5672',
'user' => 'guest',
'password' => 'guest',
'virtualhost' => '/',
'ssl' => ''
]
],

 

Above contains rabbitmq port and authentication.

You need to check yours and change value accordingly.

After doing above execute upgrade command and try below.

 

php bin/magento queue:consumers:list

You can see list of queue

I don't know related queue but you can try this one also

php bin/magento queue:consumers:start codegeneratorProcessor

 

Problem Solved? Accept as Solution!

 

Hope it helps!

Thanks

Ankit Jasani

Re: Task "Rule processing: 2": 1 item(s) have been scheduled for update.

I have added the necessary code to env.php. This what what i have now:

 

'queue' => [
        'consumers_wait_for_messages' => 1
    ],
	'queue' =>
  array (
    'amqp' =>
    array (
      'host' => 'localhost',
      'port' => '5672',
      'user' => 'user',
      'password' => 'password',
      'virtualhost' => '/'
     ),
  ),

If this is wrong in anyway or i need to merge the 2 queue sections let me know.

 

It seems magento is connecting to rabbitmq as in the rabbitmq admin panel, under queues i have async.operations.all listed. When i run php bin/magento queue:consumers:start async.operations.all i see it as an active connection in rabbitmq.

I have ran the list command and i do see a list of all queues, i ran the codegeneratorProcessor command but this does not fix the issue either.

Re: Task "Rule processing: 2": 1 item(s) have been scheduled for update.

Hi @CSP_Alex 

 

You can combine like below.

 

'queue' => [

     'consumers_wait_for_messages' => 1,
     'amqp' => [
           'host' => 'localhost',
           'port' => '5672',
           'user' => 'user',
           'password' => 'password',
           'virtualhost' => '/',
           'ssl' => ''
    ]
],

 

Please change indexer mode to Update on Schedule

You need to click on View Details button.

Because yellow bar always show for pending queue as well as completed queue. You can check by click on View Details button and check queue process completed or pending.

 

Problem Solved? Accept as Solution!

 

Hope it helps!

Thanks

 

Ankit Jasani