PHPackages                             maksslesarenko/emdrive - 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. maksslesarenko/emdrive

ActiveSymfony-bundle[Queues &amp; Workers](/categories/queues)

maksslesarenko/emdrive
======================

This bundle provides a way to work with recurrent command workers

0.1(8y ago)01.9k7MITPHPPHP &gt;7.0

Since Apr 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/MaksSlesarenko/emdrive)[ Packagist](https://packagist.org/packages/maksslesarenko/emdrive)[ RSS](/packages/maksslesarenko-emdrive/feed)WikiDiscussions develop Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

**Emdrive**

This bundle provides a built-in service that runs indefinitely and allows to trigger execution of Symfony\\Component\\Console\\Command\\Command on daily or interval bases

**Installation**

Open a command console, enter your project directory and execute the following command to download the latest version of this bundle:

`composer require maksslesarenko/emdrive`

**Configuration**

```
emdrive:
    server_name: main # incase app is running on multiple servers this has to be unique
    pool_size: 5 # number of simultanious commands allowed to be execute
    tick_interval: 2000000 # interval in microseconds between service loop checks
    cmd_start: bin/console %s -vv -e prod > /dev/null 2>&1 & # template for scheduled commands to be executed with
    cmd_kill: kill -2 %s > /dev/null 2>&1 & # template for scheduled commands to be stopped with

    storage:
        dsn: '%env(DATABASE_URL)%' # dsn for mysql or sqlite database to store schedule

    lock: emdrive_lock # lock name that is configured in framework section
    pid_dir: var/pid # directory to store process ids for executed commands
    log_dir: var/elog # directory to store logs
    lock_dir: var/lock # directory to store lock files

framework:
    lock:
        enabled: true
        resources:
            emdrive_lock: flock
            #emdrive_lock: [flock, 'memcached://localhost'] # incase multiple servers are used to run app

```

**Commands**

`bin/console emdrive:deploy` # main deploy command that detects other deploy commands and executes them in order to deploy bundle

`bin/console emdrive:deploy:update-schedule` # deploy command to update schedule

`bin/console emdrive:configure-schedule []` # change command schedule time/interval

`bin/console emdrive:service:run` # launch service

`bin/console emdrive:service:stop` # stop service

`bin/console emdrive:service:status [--watch]` # check if service is running

`bin/console emdrive:dump-schedule` # dump schedule to console

Example:

```
+----+--------------------------+-------------+---------+---------------------+---------------------+---------------+----------------+
| Id | Name                     | Server name | Status  | Last start at       | Next start at       | Schedule type | Schedule value |
+----+--------------------------+-------------+---------+---------------------+---------------------+---------------+----------------+
| 1  | first-scheduled-command  | main        | stopped | 2018-04-06 23:19:01 | 2018-04-06 23:20:01 | interval      | 1 minutes      |
| 2  | second-scheduled-command | main        | stopped | 2018-04-06 23:05:00 | 2018-04-07 23:05:00 | time          | 23:05          |
+----+--------------------------+-------------+---------+---------------------+---------------------+---------------+----------------+

```

**Create scheduled command**

```
use Emdrive\Command\ScheduledCommandInterface;
use Emdrive\InterruptableExecutionTrait;
use Emdrive\LockableExecutionTrait;
use Symfony\Component\Console\Command\Command;

class FisrtScheduledCommand extends Command implements ScheduledCommandInterface
{
    use LockableExecutionTrait;
    use InterruptableExecutionTrait;

    public function configure()
    {
        $this->setName('first-scheduled-command');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        ...
        foreach ($collection as $item) {
            if ($this->isInterrupted()) {
                break;
            }
            ...
        }
    }
}

```

After you have created new scheduled command run deploy:

`bin/console emdrive:deploy`

then configure schedule:

`bin/console emdrive:configure-schedule first-scheduled-command`

**Supervisord configuration**

```
[program:emdrive]
command=/code/bin/console emdrive:service:run
stderr_logfile = /var/log/supervisor/emdrive.error.log
stdout_logfile = /var/log/supervisor/emdrive.log
stopsignal = INT

```

**Licence**

This bundle is released under the MIT license.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

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

2946d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a055747b21dbc358af610eed568235d06fff82252af80e0755753111d1412772?d=identicon)[MaksymSlesarenko](/maintainers/MaksymSlesarenko)

---

Top Contributors

[![MaksSlesarenko](https://avatars.githubusercontent.com/u/1147978?v=4)](https://github.com/MaksSlesarenko "MaksSlesarenko (24 commits)")[![Brazhko](https://avatars.githubusercontent.com/u/8180540?v=4)](https://github.com/Brazhko "Brazhko (2 commits)")[![maria0019](https://avatars.githubusercontent.com/u/22751108?v=4)](https://github.com/maria0019 "maria0019 (2 commits)")

### Embed Badge

![Health badge](/badges/maksslesarenko-emdrive/health.svg)

```
[![Health](https://phpackages.com/badges/maksslesarenko-emdrive/health.svg)](https://phpackages.com/packages/maksslesarenko-emdrive)
```

###  Alternatives

[mmoreram/gearman-bundle

Adds gearman support to your and Symfony4, Symfony5 project

237395.2k2](/packages/mmoreram-gearman-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[webfactory/icu-translation-bundle

Enables ICU message formatting for translations in Symfony applications.

2761.8k](/packages/webfactory-icu-translation-bundle)[ecotone/symfony-bundle

Extends Ecotone with Symfony integration

11229.0k1](/packages/ecotone-symfony-bundle)[ufo-tech/json-rpc-bundle

The bundle for easy using json-rpc api on your project

224.6k3](/packages/ufo-tech-json-rpc-bundle)[idct/symfony-nats-messenger

Symfony NATS (JetStream) Messenger Bridge

181.2k](/packages/idct-symfony-nats-messenger)

PHPackages © 2026

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