Queues
A queue holds the settings that all of its jobs share: how long to wait for a response, when to retry, how many jobs run at once and how long failed jobs are kept. The job carries the request itself (URL, method, headers, payload, callback URL). A queue has no URL of its own.
Example
You send a job to a queue by name:
curl -X POST https://app.delay.run/api/jobs \ -H "Authorization: Bearer $DELAY_TOKEN" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"queue": "emails", "url": "https://api.yourapp.com/send-welcome", "payload": {"user_id": 42}}'If your current team has no queue called emails, this call creates one with the defaults below. The job then runs with a 30 second timeout and up to 3 retries. To change that, edit the queue in the dashboard (Set up a queue).
Settings
This is the full list. You change these on the queue’s edit page in the dashboard; the API can’t set them.
| Setting | Default | Allowed values | What it does |
|---|---|---|---|
| Queue name | - | Up to 255 characters, unique in the team | The name you pass as queue in the API. |
| Request timeout | 30 seconds | 1 to 300 seconds | How long Delay waits for a response. After that, the attempt fails with a timeout. |
| Enable automatic retries | On | On or off | When off, a job’s first failure sends it straight to the dead letter queue. |
| Retry delays | 60, 1800, 10800 seconds | Up to 10 delays, each 1 to 86,400 seconds | The wait before each retry. See Retries. |
| Max concurrent jobs | Empty (unlimited) | 1 to 1000 | How many of the queue’s jobs may run at the same time. |
| Dead letter retention | 14 days | 3, 7, 14 or 30 days | How long dead-lettered jobs are kept before automatic cleanup. |
| Success assertions | None | Up to 10 | Checks that a 2xx response must also pass. See Success assertions. |
| Enable this queue | On | On or off | Off pauses the queue. See Pausing a queue. |
| Enable email alerts for job failures | On | On or off | Turns all of the queue’s alerts on or off: in-app, email and Slack or Discord. See Alerts. |
Delay reads these settings each time an attempt starts. An edit applies to the next attempt, including jobs that are already waiting. Retries that are already scheduled keep their start time.
Queues created by the API
POST /api/jobs looks up the queue name in your current team. If there’s no match, it creates the queue with the defaults above.
- A typo in the name creates a second queue with default settings. It is not an error.
- To give the very first job custom settings, create the queue in the dashboard first and use its exact name.
- The API can’t create, list or configure queues.
Retries
When an attempt fails and retries are on, Delay schedules the next attempt after the next delay in Retry delays. Delays are used in order, one per retry, so a job gets 1 attempt plus one per delay.
With the default delays a job gets 4 attempts:
| Attempt | Starts | Time since attempt 1 failed |
|---|---|---|
| 1 | At the job’s scheduled time | - |
| 2 | 1 minute after attempt 1 fails | About 1 min |
| 3 | 30 minutes after attempt 2 fails | About 31 min |
| 4 | 3 hours after attempt 3 fails | About 3 h 31 min |
If attempt 4 also fails, the job is dead-lettered. The times add up the delays only; each attempt’s own duration (up to the timeout) comes on top.
- Each delay counts from the moment the previous attempt failed.
- There is no exponential backoff and no jitter. A
Retry-Afterheader from your endpoint is ignored. - A queue allows at most 10 retries, each up to 24 hours.
What counts as a failure, and why each retry is a new job with a new id: Jobs. Choosing delays: Retries and queue design.
Max concurrent jobs
Set Max concurrent jobs when the endpoint can only handle a few requests at once. When the queue is at its limit, ready jobs stay Pending. Delay checks for free slots once a minute, so a job that waited for a slot can start up to about a minute after one opens.
The limit is applied when Delay hands jobs to its workers. Jobs created at the same moment can all start before the count catches up, so treat it as a soft cap, not a guarantee.
Pausing a queue
Untick Enable this queue on the queue’s edit page to pause it.
- The API still accepts jobs for a paused queue. The Create job dialog doesn’t list paused queues.
- Jobs that come due are held as Pending. They don’t fail and don’t use up retries.
- An attempt that was already running finishes normally.
- When you tick the box again, held jobs that are due start within about a minute.
The queues list shows a paused queue as Paused. The queue’s own page shows Inactive.
Dead letter retention
A job whose last attempt fails is dead-lettered and listed under Dead letters. Once a day at 00:00 UTC, Delay deletes dead-lettered jobs older than the queue’s Dead letter retention. The dead letter queue can’t be turned off. Replaying and purging: Replay failed jobs.
Next steps
- Set up a queue: create, edit, pause and delete queues in the dashboard.
- Jobs: statuses, retries and what happens to each attempt.
- Retries and queue design: pick retry delays and split work across queues.
- Success assertions: check the response status, body or speed.