PHPackages                             buzzingpixel/craft-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. buzzingpixel/craft-scheduler

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

buzzingpixel/craft-scheduler
============================

Schedule tasks to run in Craft

1.0.0(4y ago)0350Apache-2.0PHPPHP ^8.0

Since Oct 2Pushed 4y agoCompare

[ Source](https://github.com/buzzingpixel/craft-scheduler)[ Packagist](https://packagist.org/packages/buzzingpixel/craft-scheduler)[ RSS](/packages/buzzingpixel-craft-scheduler/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (14)Versions (2)Used By (0)

Scheduler for Craft CMS
=======================

[](#scheduler-for-craft-cms)

If you would like to programmatically schedule tasks to run in Craft CMS, this is the module for you! Just set up a cron to call the command every minute, then anything you schedule to run by hooking into the event will get run on the schedule you define.

Here's how to use it:
---------------------

[](#heres-how-to-use-it)

1. In your craft project, run `composer require buzzingpixel/craft-scheduler`
2. Then run `php craft plugin/install craft-scheduler`
3. Now hook into the `RetrieveSchedule` event to add items to the schedule

### The `RetrieveSchedule` event

[](#the-retrieveschedule-event)

The `RetrieveSchedule` event is how you add runners to the schedule. Here's a demo:

```
use BuzzingPixel\CraftScheduler\ScheduleRetrieval\RetrieveSchedule;
use BuzzingPixel\CraftScheduler\ScheduleRetrieval\RetrieveScheduleEvent;
use BuzzingPixel\CraftScheduler\ScheduleRetrieval\ScheduleConfigItem;
use BuzzingPixel\CraftScheduler\Frequency;
use yii\base\Event;

Event::on(
    RetrieveSchedule::class,
    RetrieveSchedule::EVENT_RETRIEVE_SCHEDULE,
    static function (RetrieveScheduleEvent $e): void {
        $e->scheduleConfigItems()->addItem(item: new ScheduleConfigItem(
            className: SomeClass::class, // The class to run
            runEvery: Frequency::ALWAYS, // How often to run it
            method: 'myOptionalMethod', // Specify method on the class to call, defaults to __invoke
            resolveWith: SomeContainer::class, // Optionally provide your own ContainerInterface implementation. Defaults to the Yii container (or whatever default container you specify, see below)
        ));

        $e->scheduleConfigItems()->addItem(item: new ScheduleConfigItem(
            className: SomeOtherClass::class,
            runEvery: Frequency::HOUR,
        ));
    }
);
```

### The `SetDefaultContainer` event

[](#the-setdefaultcontainer-event)

The scheduler allows you to provide your own ContainerInterface implementation as the default. If no default is specified, Craft Scheduler's Yii Container implementation (a wrapper around the Yii container that implements the PSR ContainerInterface) will be used.

```
use BuzzingPixel\CraftScheduler\CraftSchedulerPlugin;
use BuzzingPixel\CraftScheduler\ScheduleRetrieval\SetDefaultContainerEvent;
use DI\ContainerBuilder;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Slim\App;
use Slim\Psr7\Factory\ResponseFactory;
use yii\base\Event;

use function DI\autowire;

Event::on(
    CraftSchedulerPlugin::class,
    CraftSchedulerPlugin::EVEN_SET_DEFAULT_CONTAINER,
    static function (SetDefaultContainerEvent $e) {
        $containerBuilder = (new ContainerBuilder())
            ->useAnnotations(true)
            ->useAutowiring(true)
            ->ignorePhpDocErrors(true)
            ->addDefinitions([
                ResponseFactoryInterface::class => autowire(ResponseFactory::class),
            ]);

        $container = $containerBuilder->build();

        $e->setDefaultContainer($container);
    }
);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

1680d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3749c595e494c26b1d9772c64f126c2f64f0d5057736dc5986d2f305432896ba?d=identicon)[buzzingpixel](/maintainers/buzzingpixel)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k17](/packages/civicrm-civicrm-core)[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

73142.3k25](/packages/jaxon-php-jaxon-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[llm/mcp-server

PHP SDK for building MCP servers

431.1k](/packages/llm-mcp-server)

PHPackages © 2026

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