PHPackages                             mgleis/php-sqlite-job-queue - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. mgleis/php-sqlite-job-queue

ActiveLibrary[Queues &amp; Workers](/categories/queues)

mgleis/php-sqlite-job-queue
===========================

A minimal job queue library written in PHP that persists data with SQLite.

1.0.0(1y ago)05GPLv3PHPPHP &gt;=8.3

Since Dec 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mgleis/php-sqlite-job-queue)[ Packagist](https://packagist.org/packages/mgleis/php-sqlite-job-queue)[ RSS](/packages/mgleis-php-sqlite-job-queue/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PHP SQLite Job Queue
====================

[](#php-sqlite-job-queue)

A minimal job queue library written in PHP that persists data with SQLite.

Use it for small projects / prototypes with at most hundreds or thousands of jobs.

Install
-------

[](#install)

```
composer require mgleis/php-sqlite-job-queue

```

Usage
-----

[](#usage)

### The Main Use Cases

[](#the-main-use-cases)

#### Add a new job

[](#add-a-new-job)

```
$queue = new Queue('queue.sqlite');
$queue->push("a string");
$queue->push(["an" => "array"]);
$queue->push([0, 1, 2, 3, 4]);
$queue->push(['type' => 'SendEmail', 'to' => '...']);

```

#### Process jobs with workers

[](#process-jobs-with-workers)

```
$worker = new Worker($queue);
$worker->process(function(Job $job) {
    $payload = $job->payload;
    if ($payload['type'] == 'SendEmail')
        send_email(...);
});

```

#### Worker Configuration

[](#worker-configuration)

You have several options to configure the worker. The options should be self-explanatory:

```
// optional configuration
$worker
    ->withMaxTotalRuntimeInSeconds(60)
    ->withMaxJobCount(100)
    ->withSleepTimeBetweenJobsInMilliseconds(1)
    ->withSleepTimeOnEmptyQueueInMilliseconds(100);

```

### Edge Cases

[](#edge-cases)

### Determine Size of the queue

[](#determine-size-of-the-queue)

```
$size = $queue->size();

```

### Get a specific job

[](#get-a-specific-job)

```
$job = $queue->get(12345);

```

### Handling Errors

[](#handling-errors)

TBD

### Handling Timeouts (reserved jobs)

[](#handling-timeouts-reserved-jobs)

TBD

### Handling database locks

[](#handling-database-locks)

TBD

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

528d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62cefaca0cce59f88d67d18a80b33ab15852c0d85ad76e7ce585553759917122?d=identicon)[plutus78](/maintainers/plutus78)

---

Top Contributors

[![mgleis](https://avatars.githubusercontent.com/u/3601371?v=4)](https://github.com/mgleis "mgleis (12 commits)")

### Embed Badge

![Health badge](/badges/mgleis-php-sqlite-job-queue/health.svg)

```
[![Health](https://phpackages.com/badges/mgleis-php-sqlite-job-queue/health.svg)](https://phpackages.com/packages/mgleis-php-sqlite-job-queue)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2228.8M171](/packages/react-async)[react/promise-stream

The missing link between Promise-land and Stream-land for ReactPHP

11512.9M45](/packages/react-promise-stream)[illuminate/bus

The Illuminate Bus package.

6043.8M409](/packages/illuminate-bus)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
