PHPackages                             geckoboom/scheduler - 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. [CLI &amp; Console](/categories/cli)
4. /
5. geckoboom/scheduler

ActiveLibrary[CLI &amp; Console](/categories/cli)

geckoboom/scheduler
===================

Cron scheduler for console commands

1.0.5(3y ago)085BSD-3-ClausePHPPHP &gt;=7.4

Since Oct 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/geckoboom/scheduler)[ Packagist](https://packagist.org/packages/geckoboom/scheduler)[ RSS](/packages/geckoboom-scheduler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (7)Versions (6)Used By (0)

Task Scheduling
===============

[](#task-scheduling)

Table of Contents
-----------------

[](#table-of-contents)

1. [Introduction](#introduction)
2. [Installation](#installation)
3. [Configuration](#configuration)
4. [Usage](#usage)
5. [Scheduling](doc/scheduling.md)
    1. [Schedule Frequency Options](doc/scheduling.md#schedule-frequency-options)
    2. [Truth Test Constraints](doc/scheduling.md#truth-test-constraints)6[Advanced](doc/advanced.md)

Introduction
------------

[](#introduction)

Command scheduler is a great approach to managing scheduled console commands on the server. The package allows you to control your task scheduling within the console application. When using a scheduler, only a single cron entry is required on your server.

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

[](#installation)

This is installable via Composer as This is installable via [Composer](https://getcomposer.org/) as [geckoboom/scheduler](https://packagist.org/packages/geckoboom/scheduler):

```
composer require geckoboom/scheduler

```

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

[](#configuration)

Several steps required to configure scheduler

1. Provide implementation of `Geckoboom\Scheduler\CallerInterface`.

```
class ReflectionCaller implements \Geckoboom\Scheduler\CallerInterface
{
    protected ReflectionContainer $container;

    public function call(\Closure $callback){
        $args = [];
        $reflectionMethod = new \ReflectionMethod($callback, '__invoke');
        $args = [];
        foreach ($reflectionMethod->getParameters() as $parameter) {
            if (!$this->container->has($parameter->getName()) && $parameter->isDefaultValueAvailable()) {
                $args[$parameter->getName()] = $parameter->getDefaultValue();
            }
        }

        return $this->container->call($callback, $args);
    }
}
```

2. Provide two implementations of `EventMutexInterface` and `ScheduleMutexInterface`. The package contains default realizations of these interfaces based on `Psr\SimpleCache\CacheInterface` dependency. You can do it in such ways

```
   $container->add(
        \Psr\SimpleCache\CacheInterface::class,
        MyCacheImplementation::class
   );

   $container->add(
        \Geckoboom\Scheduler\EventMutexInterface::class,
        \Geckoboom\Scheduler\EventMutex\CacheEventMutex::class
   );

   $container->add(
        \Geckoboom\Scheduler\ScheduleMutexInterface::class,
        \Geckoboom\Scheduler\ScheduleMutex\CacheScheduleMutex::class
   );
```

or create your own realizations

```
    $container->add(
           \Geckoboom\Scheduler\EventMutexInterface::class,
           MyEventMutexImplementation::class
    );

    $container->add(
        \Geckoboom\Scheduler\ScheduleMutexInterface::class,
        MyScheduleMutexImplementation::class
    );
```

3. Provide your `ScheduleRegistrarInterface` dependency.

```
class MyScheduleRegistrar implements \Geckoboom\Scheduler\ScheduleRegistrarInterface
{
    public function schedule(\Geckoboom\Scheduler\Schedule $schedule) : void {
        $schedule->command('send:emails', ['--option1' => 'value', 'argument1'])
            ->daily()
            ->withoutOverlapping();

        $schedule->command('orders:distribute')
            ->mondays()
            ->at('14:00')
            ->runInBackground();
    }
}

...

$container->add(
    \Geckoboom\Scheduler\ScheduleRegistrarInterface::class,
    MyScheduleRegistrar::class
);
```

4. Provider `Schedule` singleton dependency

```
   $container->addShared(
        \Geckoboom\Scheduler\Schedule::class,
        function ($di): \Geckoboom\Scheduler\Schedule {
            $schedule = new \Geckoboom\Scheduler\Schedule(
                $di->get(\Geckoboom\Scheduler\EventMutexInterface::class),
                $di->get(\Geckoboom\Scheduler\ScheduleMutexInterface::class),
                $di->get(\Geckoboom\Scheduler\CommandBuilder::class),
                '/path/to/project/root',
                new DateTimeZone('Europe/London')
            );

            $registrar = $di->get(\Geckoboom\Scheduler\ScheduleRegistrarInterface::class);
            $registrar->schedule($schedule);

            return $schedule;
        }
   );
```

Usage
-----

[](#usage)

Now you can create executable script or console command based on the appropriate framework syntax.

```
   $service = $container->get(\Geckoboom\Scheduler\ScheduleService::class);

   $service->run(new \DateTimeImmutable());
```

The last step is to add a single cron configuration entry to our server that runs your executable command every minute.

```
* * * * * cd /path-to-your-project && php /path-to-executable-script >> /dev/null 2>&1
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~0 days

Total

5

Last Release

1298d ago

PHP version history (2 changes)1.0.0PHP ~7.4

1.0.1PHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

[![geckoboom](https://avatars.githubusercontent.com/u/41550729?v=4)](https://github.com/geckoboom "geckoboom (15 commits)")

---

Tags

scheduler

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/geckoboom-scheduler/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[nunomaduro/phpinsights

Instant PHP quality checks from your console.

5.6k10.8M424](/packages/nunomaduro-phpinsights)[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[jmose/command-scheduler-bundle

This Symfony bundle will allow you to schedule all your commands just like UNIX crontab

3361.4M1](/packages/jmose-command-scheduler-bundle)

PHPackages © 2026

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