How to execute a specific scheduled task in shopware 6?

I want to execute a specific scheduled task. how to do it in shopware 6?

You may have a look at Setting up a scheduled task 

@Shopwareianer schrieb:

You may have a look at Setting up a scheduled task 

 

 

  1. I am using this command to run the task

php bin/console scheduled-task:run

I want to execute only my task

like  

php bin/console scheduled-task:delete_newsletter_recipient_task:run

How to do that?

  1. I have executed the command  

   php bin/console scheduled-task:run

  I have added some print_r() in my task. I want to see the print_r() when the task executed.

  but it is not showing the data. I have tried this command 

  php bin/console messenger:consume

  How to execute and debug my scheduled task?

I am also interested in testing the execution of a scheduled task for development purposes. Something like:

# This does not work - do not copy ;)
php src/bin/console scheduled-task:run --name shopware.sitemap_generate 

 

Hello, I would like to join in on this topic! Is there a possibility to execute only single tasks? Have you found a solution?

And if a task does not run, but is simply marked as „failed“ in the database - what is the best way to debug this? I have not found an error log anywhere.

Best regards, LA

You can check this table for ‚dead_message‘ for error messages

Or use the following plugin