The AI Content Generator’s cron job automates content generation based on the configured settings. Here’s how it functions:
- Language Selection: The cron job determines whether to generate content for all languages or only for the default language, based on the settings.
- Product Selection: Products are selected for content generation only if at least one of the enabled fields (e.g., product description, meta description, meta keywords, H1, H2, tags) is empty. If all fields are already populated, the product is skipped.
- Prompt Generation: For each selected product, a single prompt is created specifying which fields require generation.
- AI Response Processing: The AI generates and returns content for all requested fields in a structured response.
- Field Overwrite:
- If the “Overwrite Fields” option is enabled, existing data will be replaced.
- If disabled, only empty fields will be populated while existing content remains unchanged.
- Simulation Mode:
- When enabled, generated content is stored in a temporary database and does not directly update the main product table.
- This allows manual review and approval before applying changes to the main database.
This ensures efficient and controlled content generation while maintaining flexibility in data management.