> ## Documentation Index
> Fetch the complete documentation index at: https://studio.bjanczak.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Queues and scheduled maintenance

> Route media jobs to workers, review the scheduler and verify recovery of interrupted work.

A queue worker processes dispatched jobs. The scheduler starts periodic maintenance, including recovery and cleanup. Run both services when your configuration uses both.

## Match workers to enabled features

| Feature | Where to set or verify the queue |
| - | - |
| Native images and video processing | [Processing configuration](https://studio.bjanczak.com/processing-configuration.md) |
| Document thumbnails | [Document thumbnails](https://studio.bjanczak.com/document-thumbnails.md), when execution is set to queue |
| Audio waveform generation | [Audio previews and waveforms](https://studio.bjanczak.com/audio-previews.md) |
| Assistant | [Assistant configuration](https://studio.bjanczak.com/assistant.md), with an asynchronous connection |
| Background ZIPs | [Archives and bulk downloads](https://studio.bjanczak.com/archive-downloads.md#prepare-an-archive-in-the-background) |
| Permanent deletion | [Trash and retention](https://studio.bjanczak.com/trash.md) |
| Workspace transfer and removal | [Workspace removal](https://studio.bjanczak.com/workspace-retirement.md) |

For example, if the configured connections are Redis and the assistant and archive queues are named `media-studio-ai` and `media-archives`, run a supervised process for each.

```bash theme={null}
php artisan queue:work redis --queue=media-studio-ai
php artisan queue:work redis --queue=media-archives
```

Set job, worker and retry timeouts for the corresponding feature. Use the [archive guide](https://studio.bjanczak.com/archive-downloads.md#prepare-an-archive-in-the-background) for the longer archive job timeout. Ensure each worker can read and write its configured disks and run any processor binary it needs. Restart long-running workers after deploying updated code or configuration.

## Verify scheduled tasks

```bash theme={null}
php artisan schedule:list
php artisan queue:failed
php artisan list media-studio
```

The provider registers maintenance for navigation, workspace retirement and edited versions. Trash, Slack, API housekeeping, notifications and assistant maintenance depend on feature settings. The actual list for your installed app is authoritative. Add the schedules documented for [upload receipts and staging](https://studio.bjanczak.com/upload-recovery.md) and [prepared archives](https://studio.bjanczak.com/archive-downloads.md#prepare-an-archive-in-the-background) if you enable those features. Coordinate scheduling across app replicas using shared cache locks or a single designated scheduler.

## Test an interrupted workflow

In a test workspace, submit an image and an archive to their configured workers. Check that the uploaded original becomes usable independently of the thumbnail and that the ZIP becomes available only after its job finishes. Test recovery using a disposable transfer in the [upload recovery guide](https://studio.bjanczak.com/upload-recovery.md). If an item stays pending, inspect the connection, queue name and failed jobs before retrying.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.