> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aistudio.youthnic.shop/llms.txt
> Use this file to discover all available pages before exploring further.

# Schedule Catalog Generation, Monitor Progress, and Retry

> Schedule automatic catalog generation, monitor real-time batch progress, and recover failed colourways with manual or automatic retry.

Once at least one colourway shows **Gemini analysis ready** (green), you can schedule the catalog for generation or start it immediately. The system processes colourways one at a time using a durable queue — you can safely close the page and the run continues in the background. The first colourway's Pose 1 locks the model and scene for every subsequent SKU in the batch.

<Tip>
  The catalog worker processes one colourway at a time for reliability. The first colourway's Pose 1 becomes the **consistency anchor** — the approved visual reference that locks the model identity, scene, camera continuity, and lighting for every remaining SKU. If the first colourway fails before Pose 1 completes, the anchor is not set and subsequent colourways remain queued until a successful anchor exists.
</Tip>

## Before scheduling

Check the **Catalog readiness** panel at the top of the catalog detail page before you schedule:

* The readiness counter shows `N / Total` colourways ready. Only colourways with a green **Gemini analysis ready** status are included in the run.
* Colourways still in draft (missing references) or with preflight running are automatically excluded from the current run.
* The generation section displays a summary: *"N ready colourways will be included. M incomplete colourways are excluded until required product evidence is uploaded."*
* The Styling Plan must be **approved** before the queue will start. If the plan is pending, approve it in the Styling Plan section first.

## Scheduling a run

The schedule controls live in the **Steps 3–4 · Analyze and generate** section at the bottom of the catalog detail page.

<Steps>
  <Step title="Set the generation date and time">
    Click the **Generation date and time** datetime picker and select your target date and time. All times are interpreted as **Asia/Kolkata** timezone. Click **Tomorrow · 10:00 AM** to fill in the next morning as a quick default.
  </Step>

  <Step title="Use an event prep deadline (optional)">
    If the catalog is linked to a campaign event, a **Use event prep deadline** button appears below the datetime picker. Clicking it sets the generation time to the event's preparation deadline automatically — no manual date entry needed.
  </Step>

  <Step title="Schedule or start">
    * Click **Schedule automatic generation** to arm the run for the selected future time. The catalog status changes to `scheduled` and a confirmation displays the scheduled date and time in Asia/Kolkata.
    * Click **Generate ready colourways now** to start immediately without waiting for a scheduled time.
  </Step>
</Steps>

## Changing or cancelling a schedule

While the catalog is in `scheduled` state, the schedule panel shows the confirmed run time and two actions:

* **Save new time** — edit the datetime picker and click this to move the run to a new time.
* **Cancel schedule** — returns the catalog to draft state, making all references and settings editable again. A confirmation message reads *"Automatic generation was cancelled. The catalog is editable again."*

## During generation

When a run starts, the catalog status changes to `generating`. The schedule panel switches to a live progress view:

* The active colourway's SKU is displayed, with its current job state — `waiting for worker`, `pose N of 5`, or `cancelling`.
* A pose counter shows completed and total poses for the active SKU: for example, `3/5 poses stored`.
* If a pose fails QA and enters automatic retry, the panel shows the next retry time: *"Automatic retry at HH:MM:SS."*

You can safely navigate away — the durable generation queue continues processing in the background. Refresh or return to the catalog at any time to see the latest state.

To stop the current SKU mid-generation, click **Stop active generation**. A confirmation dialog appears before any action is taken. Images that have already been generated and stored for the active SKU are preserved; only the remaining poses are cancelled.

To stop all queued and active colourways at once, click **Stop generation** next to the catalog name at the top of the page. A confirmation dialog asks you to confirm. Completed images across all already-finished SKUs remain saved.

## Automatic recovery

The generation system is designed to recover from transient failures without manual intervention:

<Accordion title="Pose QA retry">
  After GPT Image 2 generates a pose, Gemini validates it against the product profile and locked identity. If QA fails, the pose is automatically re-queued with a retry delay. The minimum retry backoff respects OpenAI Tier 1 rate limits (30 seconds minimum). The active colourway panel shows the retry time while the job is queued.
</Accordion>

<Accordion title="Stale job recovery">
  If a generation job becomes stale — for example, after a server restart or timeout — the system automatically reclaims it within a few minutes. The recovered job returns to the queue while keeping the same session, product profile, pose plan, and approved anchor, so no work is lost.
</Accordion>

<Accordion title="Catalog preflight recovery">
  The system runs a background preflight check every two minutes and picks up any colourway whose references were uploaded but whose Gemini preflight was never completed — for example, if the browser was closed before the preflight result arrived. You do not need to re-upload references for this to work.
</Accordion>

<Accordion title="Exhausted retries">
  When a colourway has exhausted all automatic retry attempts, it is marked `failed`. The system does not create new paid generation jobs for exhausted colourways automatically. Use the **Retry** button in the colourway inspector to requeue a failed SKU — this button is available only when the catalog has a locked consistency anchor (that is, at least one SKU has completed Pose 1 successfully). Without an anchor, restart the full catalog instead.
</Accordion>

## After generation

When all included colourways finish, the catalog status changes to `completed` (or `failed` if some colourways could not complete). Review the results:

* Open **History** and search by SKU or filter by `completed` or `failed` status to review individual pose outputs.
* On the catalog detail page, each colourway row shows a 5-pose thumbnail strip in the inspector panel when you click it.
* The **Variants & Session History** table at the bottom of the catalog page lists every SKU with its status and Session ID. Copy a Session ID to look up the exact generation trail and logs in History.

For a catalog that ended in `failed` state with some colourways incomplete, click **Restart complete catalog now** (the same button that normally reads *Generate ready colourways now*). This re-queues all failed colourways for a new generation run. Colourways that already completed are not re-generated.

Once generation is complete, Catalog Production in the **Catalog Production** tab tracks the remaining stages: Quality Review, Listing, and final approval through to **Listed** status.
