There are three ways to generate the Tweakwise feed in Shopware:
- Using the scheduling mechanism in the feed settings (recommended)
- Using CronJobs
- Trigger the creation manually
1. Use the schedule mechanism (recommended)
In the feed settings you can use the field 'Recurring' to set a schedule or an interval on which the feed should be created.
It will use the default scheduler mechanism from Shopware/Symfony to generate the feed. If you want to use the interval, enter a number of minutes. Enter a Cron schedule to follow that schedule.
Cron schedules
More information about the Cron schedule notation can be found here.
Is the scheduler working?
There are various plugins to monitor you scheduled tasks in Shopware to ensure they are running smoothly. i.e. Scheduled Task Monitoring
2. Using cron jobs
You can generate a cron job yourself on the webserver running your webshop. Please make sure the script is executed in the current directory. I.e. (don't forget to change the path to your shops path)
0 * * * * cronlock cd /var/www/your_site/deployer/current/ && php8.2 bin/console tw:generate-feed > /var/www/your_site/deployer/current/var/log/cron_debugfile.log 2>&1
3. Trigger the feed generation manually
To generate the feed once manually you can run the script using the CLI.
php bin/console tweakwise:generate-feed -q
Please note that it's recommended to run this command in a cron that runs at least once a day.