# JobQueueOptions.drainTimeout property · @imqueue/job

Source: https://imqueue.org/api/job/latest/job.jobqueueoptions.draintimeout/
Published: 2026-08-31
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/job 3.3.0 — generated reference, not hand-written

Milliseconds a drain waits for jobs in flight before giving up on them. Ignored unless [JobQueueOptions.drain](https://imqueue.org/api/job/latest/job.jobqueueoptions.drain/) is on.

**Signature:**

```typescript
drainTimeout?: number;
```

## Default Value

the `IMQ_DRAIN_TIMEOUT` environment variable, itself [DEFAULT\_IMQ\_DRAIN\_TIMEOUT](https://imqueue.org/api/job/latest/job.default_imq_drain_timeout/) (4000)

## Remarks

The wait is always bounded and the process always exits. This is the number to raise for jobs that legitimately take longer than a few seconds — the 4000 default is sized for the `imq stop` CLI, not for your handlers. Whatever is still running when it expires is abandoned, and [JobQueueOptions.drainRequeue](https://imqueue.org/api/job/latest/job.jobqueueoptions.drainrequeue/) decides whether it comes back.

