PHPackages                             mcfedr/periodic-queue-driver-bundle - 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. [Database &amp; ORM](/categories/database)
4. /
5. mcfedr/periodic-queue-driver-bundle

Abandoned → [mcfedr/queue-manager-bundle](/?search=mcfedr%2Fqueue-manager-bundle)Symfony-bundle[Database &amp; ORM](/categories/database)

mcfedr/periodic-queue-driver-bundle
===================================

A bundle for running symfony background tasks with doctrine as the driver

1.5.0(7y ago)19.6k1MITPHPPHP &gt;=5.5

Since Feb 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mcfedr/periodic-queue-driver-bundle)[ Packagist](https://packagist.org/packages/mcfedr/periodic-queue-driver-bundle)[ RSS](/packages/mcfedr-periodic-queue-driver-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (8)Versions (12)Used By (0)

Periodic Queue Driver Bundle
============================

[](#periodic-queue-driver-bundle)

A driver for [Queue Manager Bundle](https://github.com/mcfedr/queue-manager-bundle) that uses runs jobs periodically.

This driver doesn't run jobs, it requires another driver to actually process jobs.

[![Latest Stable Version](https://camo.githubusercontent.com/725f122b80fff88e771eec5716495e479ccfcec4ef20e86f92a0d8b8e5c58761/68747470733a2f2f706f7365722e707567782e6f72672f6d63666564722f706572696f6469632d71756575652d6472697665722d62756e646c652f762f737461626c652e706e67)](https://packagist.org/packages/mcfedr/periodic-queue-driver-bundle)[![License](https://camo.githubusercontent.com/b4cc9e6bc12b30a77181e882c0c88a9cfeef79999d42117a742819ec8e573baf/68747470733a2f2f706f7365722e707567782e6f72672f6d63666564722f706572696f6469632d71756575652d6472697665722d62756e646c652f6c6963656e73652e706e67)](https://packagist.org/packages/mcfedr/periodic-queue-driver-bundle)[![Build Status](https://camo.githubusercontent.com/5e8a4fd9273dea4ba71a78beea763824c71ded5f2a42df480486bd7af8c2cbe5/68747470733a2f2f7472617669732d63692e6f72672f6d63666564722f706572696f6469632d71756575652d6472697665722d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mcfedr/periodic-queue-driver-bundle)

Usage
-----

[](#usage)

There is no runner daemon for this driver as it just plugs into other drivers. Use it by `put`ting jobs into this driver with the `period` option.

Install
-------

[](#install)

### Composer

[](#composer)

```
composer require mcfedr/periodic-queue-driver-bundle

```

### AppKernel

[](#appkernel)

Include the bundle in your AppKernel

```
public function registerBundles()
{
    $bundles = [
        ...
        new Mcfedr\QueueManagerBundle\McfedrQueueManagerBundle(),
        new Mcfedr\PeriodicQueueDriverBundle\McfedrPeriodicQueueDriverBundle(),

```

Config
------

[](#config)

With this bundle installed you can setup your queue manager config similar to this:

```
mcfedr_queue_manager:
    managers:
        periodic:
            driver: periodic
            options:
                default_manager: delay
                default_manager_options: []

```

This will create a `QueueManager` service named `"mcfedr_queue_manager.periodic"`

- `default_manager` - Default job processor, must support delayed jobs, for example [Doctrine Delay](https://packagist.org/packages/mcfedr/doctrine-delay-queue-driver-bundle)
- `default_manager_options` - Default options to pass to job processor `put`

Options to `QueueManager::put`
------------------------------

[](#options-to-queuemanagerput)

- `period` - The average number of seconds between job runs
- `manager` - Use a different job processor for this job
- `manager_options` - Options to pass to the processors `put` method

Explanation
-----------

[](#explanation)

### Commands

[](#commands)

There are two commands that can be used to investigate how well spread jobs will. A simple way to visualize is to pipe into [feedgnuplot](https://github.com/dkogan/feedgnuplot).

`rand-add` uses a naive implementation of just adding a random number of seconds to get the time for the next run:

```
./tests/console test:distribution:rand-add -v | feedgnuplot --histogram 0 --binwidth 60 --hardcopy "rand-add.png" --exit

```

[![Graph of rand-add](rand-add.png)](rand-add.png)

`periodic` uses the bundle implementation:

```
./tests/console test:distribution:periodic -v | feedgnuplot --histogram 0 --binwidth 60 --hardcopy "periodic.png" --exit

```

[![Graph of periodic](periodic.png)](periodic.png)

Job Token
---------

[](#job-token)

There is job\_tokens argument which can help with job uniqueness.

Usage example

When put new periodic job, you get PeriodicJob object.

```
    $periodicJob = $this->manager->put('some_service', [
        'some_argument' => 'some_value',
    ], [
        'period' => 'some_seconds',
    ], 'periodic');

```

You can do $periodicJob-&gt;getToken() of it and store the token for job execution

While execution

```
 public function execute(array $arguments)
    {
        // Get the stored token
        ...

        if ($storedToken != $arguments['job_tokens']['token']) {
            throw new InvalidTokenException();
        }

        ...

        $storedToken = ($arguments['job_tokens']['next_token']);

        // Save stored token for next execition.
    }

```

Each job execution new token is generated so if some job duplication will appear only one will be executed and other jobs will fail

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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

Every ~60 days

Recently: every ~94 days

Total

11

Last Release

2819d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7039999f29a83140d61116032ec1684c752412e458ad1999e15eea2f8808498c?d=identicon)[mcfedr](/maintainers/mcfedr)

---

Top Contributors

[![mcfedr](https://avatars.githubusercontent.com/u/704356?v=4)](https://github.com/mcfedr "mcfedr (23 commits)")

---

Tags

doctrinequeuejobscheduletask

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/mcfedr-periodic-queue-driver-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mcfedr-periodic-queue-driver-bundle/health.svg)](https://phpackages.com/packages/mcfedr-periodic-queue-driver-bundle)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k91.3M282](/packages/laravel-horizon)[mcfedr/queue-manager-bundle

A bundle for managing job queues

1094.3k7](/packages/mcfedr-queue-manager-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[mmucklo/queue-bundle

Symfony2/3/4/5 Queue Bundle (for background jobs) supporting Mongo (Doctrine ODM), Mysql (and any Doctrine ORM), RabbitMQ, Beanstalkd, Redis, and ... {write your own}

120911.4k](/packages/mmucklo-queue-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

939.0k](/packages/ahmed-bhs-doctrine-doctor)[enqueue/dbal

Message Queue Doctrine DBAL Transport

246.4M9](/packages/enqueue-dbal)

PHPackages © 2026

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