> For the complete documentation index, see [llms.txt](https://docs.hubyte.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hubyte.de/seo-ultimate/english-documentation/cronjob.md).

# Cron job / automation

Every bulk generator can be saved as a **template** and executed **automatically once a day**. This keeps meta data, image tags & co. continuously maintained even for new or changed articles – without manual re-generation.

## Setup

1. In the desired bulk generator, tick the **categories** and set the **fields** (template/variables) and **options**.
2. Enable the **"Cron job (run automatically once a day)"** switch.
3. **Save** the template (via "Save template" or "Create template").

This stores **field contents, options, selected categories and the cron status** in the template. The daily task then processes **all** templates for which the cron job is enabled.

## How it works

* The automatic execution uses Shopware's **scheduled task system** (`hueb_seo.bulk_generate`, interval: daily).
* It requires a running scheduler / message consumer on the server – usually already set up on production systems.
* The generation runs server-side and uses the same variable resolution, counter and language logic as the manual run.

## Trigger manually (optional, for admins/developers)

The task can be started manually at any time:

```bash
bin/console scheduled-task:run-single hueb_seo.bulk_generate
```

Registration (if the task is missing after an update):

```bash
bin/console scheduled-task:register
```

## Notes

* **Overwrite:** mind the *Overwrite existing entries* option. If it is off, the cron only fills empty fields; if it is on, existing values are re-set on every run.
* **Languages:** for the image bulk, the *All languages* option determines whether it writes to all languages or only the default language.
* **Storefront-specific variables** such as `{{ product.variation.0.group }}` are not resolved in the cron (they are only available in the storefront context). Standard variables like name, number and manufacturer are suitable for the cron.
