php - manually call cron job action programmatically in shopware
522
I'm new in shopware.
I want to call cron job function programmatically is there any way ?
I have tried following for call function using command line but getting too many argument error.
php bin/console sw:cron:run ACTION-NAME
php bin/console sw:cron:run NAME -f
I need one more help is use shopware function out side of shopware my custom file. is it possible ?
Thanks in advance.
Answer
Solution:
You can run the specific cronjob by following command. For example:
But it's only possible since Shopware 5.1.6, not as Shopware says since 5.1.5.
Answer
Solution:
In case you need just run cron job for testing, you can run cron from browser:
There need to replace
myshop.com
to your domain. In this case all cron jobs will be handled by opening this link.In case for some reason you need to run cron via console, you can do it this way:
There need to replace
path_to_shopware
to your server path.