# JobQueue.onPop() method · @imqueue/job

Source: https://imqueue.org/api/job/latest/job.jobqueue.onpop/
Published: 2026-07-31
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/job 3.0.3 — generated reference, not hand-written

Registers the handler called for each job popped from this queue.

**Signature:**

```typescript
onPop(handler: JobQueuePopHandler<T>): JobQueue<T>;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| handler | [JobQueuePopHandler](https://imqueue.org/api/job/latest/job.jobqueuepophandler/)<T> | what to do with each job; its return value re-schedules |


**Returns:**

[JobQueue](https://imqueue.org/api/job/latest/job.jobqueue/)<T>

this queue, for chaining

## Remarks

Required before [JobQueue.start()](https://imqueue.org/api/job/latest/job.jobqueue.start/) or [JobQueue.push()](https://imqueue.org/api/job/latest/job.jobqueue.push/), both of which throw without it. Replaces any handler already registered — the last call wins. See [JobQueuePopHandler](https://imqueue.org/api/job/latest/job.jobqueuepophandler/) for what its return value does.

