> For the complete documentation index, see [llms.txt](https://docs.bullmq.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bullmq.net/http-api/queues/adding-jobs/lifo.md).

# LIFO

LIFO stands for Last-In-First-Out. This mode is the oposite of a standard queue, where jobs are processed in the same order as they arrive to the queue. In a LIFO queue the last added job will be processed before existing jobs.

To enable this mode for a given job just pass the "lifo" property and set it to true.

```typescript
interface JobOpts {
  lifo: boolean;
  // ... More opts
}
```

{% tabs %}
{% tab title="Curl" %}

```powershell
curl --location 'http://mydomain.dev/queues/my-queue/jobs' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer my-secret-token' \
--data '[{
	  "name": "paint-black",
          "data": {},
         },
         {
	  "name": "paint-red",
          "data": {},
          "opts": {
            "lifo": true
          }
         } 
]'
```

{% endtab %}
{% endtabs %}

In the above snippet, the job named "paint-red" will be processed before "paint-black" as it was added with the lifo option set to true.
