PHPackages                             digiloopinc/laravel-pausable-batch - 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. digiloopinc/laravel-pausable-batch

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

digiloopinc/laravel-pausable-batch
==================================

A Laravel package that adds pause and resume controls to queued batch jobs.

0.0.2(4mo ago)2115[2 PRs](https://github.com/digiloopinc/laravel-pausable-batch/pulls)MITPHPPHP ^8.2CI passing

Since Feb 9Pushed 2mo agoCompare

[ Source](https://github.com/digiloopinc/laravel-pausable-batch)[ Packagist](https://packagist.org/packages/digiloopinc/laravel-pausable-batch)[ Docs](https://github.com/digiloopinc/laravel-pausable-batch)[ GitHub Sponsors](https://github.com/digiloopinc)[ RSS](/packages/digiloopinc-laravel-pausable-batch/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (9)Versions (7)Used By (0)

Laravel Pausable Batch
======================

[](#laravel-pausable-batch)

Pause and resume Laravel job batches running on Redis queues.

Warning

This package is currently under active development and is not yet considered production-stable.

When a batch is paused, workers using the `redis` queue driver will not execute jobs that belong to that batch. Paused jobs are parked in Redis and restored when the batch resumes.

Installation
------------

[](#installation)

```
composer require digiloopinc/laravel-pausable-batch
```

Queue Connection Setup
----------------------

[](#queue-connection-setup)

Use your standard `redis` queue connection:

```
// config/queue.php
'connections' => [
    'redis' => [
        'driver' => 'redis',
        'connection' => 'default',
        'queue' => env('REDIS_QUEUE', 'default'),
        'retry_after' => 90,
        'block_for' => null,
        'after_commit' => false,
        'options' => [
            'pausable' => [
                'redis_prefix' => env('PAUSABLE_BATCH_REDIS_PREFIX', 'laravel-pausable-batch'),
                'restore_chunk_size' => (int) env('PAUSABLE_BATCH_RESTORE_CHUNK_SIZE', 1000),
            ],
        ],
    ],
],
```

Then run workers against that connection:

```
php artisan queue:work redis
```

Horizon uses the same `redis` connection and is automatically supported.

Batch API
---------

[](#batch-api)

Batches returned from the repository are wrapped as `PausableBatch` and expose:

- `pause(): void`
- `paused(): bool`
- `resume(): void`

```
use Illuminate\Support\Facades\Bus;

$batch = Bus::batch([
    new \App\Jobs\FirstJob(),
    new \App\Jobs\SecondJob(),
])->dispatch();

$batch->pause();

if ($batch->paused()) {
    $batch->resume();
}
```

Configuration
-------------

[](#configuration)

Configure pausable behavior directly on each queue connection under `options.pausable`:

- `redis_prefix`: Redis key prefix for pause metadata.
- `restore_chunk_size`: Number of paused jobs restored per chunk on resume.

Pause metadata uses the same Redis connection as the queue connection's `connection` setting.

Behavior Notes
--------------

[](#behavior-notes)

- Only `Batchable` jobs are considered pausable.
- Pause is enforced at worker pop time.
- Paused jobs are moved off the active queue into per-batch paused lists.
- Resume restores paused jobs to the tail of their original queue.
- Pause metadata and parked jobs are cleaned on resume, cancellation, and finish.

Testing
-------

[](#testing)

```
composer test
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance81

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.6% 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

Every ~0 days

Total

2

Last Release

144d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/34399468ca464d756e960e20f764973f1871fe17f7fa093d57608eb662f5e9ff?d=identicon)[digiloopinc](/maintainers/digiloopinc)

---

Top Contributors

[![justsanjit](https://avatars.githubusercontent.com/u/9400880?v=4)](https://github.com/justsanjit "justsanjit (12 commits)")[![digiloopinc](https://avatars.githubusercontent.com/u/194721853?v=4)](https://github.com/digiloopinc "digiloopinc (5 commits)")

---

Tags

digiloopinclaravel-pausable-batch

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/digiloopinc-laravel-pausable-batch/health.svg)

```
[![Health](https://phpackages.com/badges/digiloopinc-laravel-pausable-batch/health.svg)](https://phpackages.com/packages/digiloopinc-laravel-pausable-batch)
```

###  Alternatives

[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k55.0M618](/packages/laravel-scout)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M208](/packages/illuminate-broadcasting)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M306](/packages/laravel-horizon)[illuminate/notifications

The Illuminate Notifications package.

513.1M1.1k](/packages/illuminate-notifications)[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k11.8M117](/packages/nuwave-lighthouse)

PHPackages © 2026

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