PHPackages                             switon/schedule - 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. switon/schedule

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

switon/schedule
===============

Recurring scheduled tasks with a shared app clock, discovery, and optional Redis locking for Switon Framework

v1.0.0(1mo ago)00MITPHPPHP &gt;=8.3CI passing

Since Jun 7Pushed 2mo agoCompare

[ Source](https://github.com/switon-php/schedule)[ Packagist](https://packagist.org/packages/switon/schedule)[ Docs](https://github.com/switon-php/schedule)[ RSS](/packages/switon-schedule/feed)WikiDiscussions main Synced 3w ago

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

Switon Schedule Package
=======================

[](#switon-schedule-package)

[![Schedule CI](https://camo.githubusercontent.com/b2ab81d7d00ee72bf7ba1d5c452ea29c7fa428c8d6f614b6de566dc811853fc3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f737769746f6e2d7068702f7363686564756c652f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d5363686564756c652532304349)](https://github.com/switon-php/schedule/actions/workflows/ci.yml) [![PHP 8.3+](https://camo.githubusercontent.com/c03f51341eebaefabbf137e291b20523fc74b4ffd084406d88524d266d95085d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d373737424234)](https://www.php.net/)

Switon's scheduled task layer for `#[Scheduled]` runners, task discovery, locking, and CLI execution.

Highlights
----------

[](#highlights)

- **Task registration:** `#[Scheduled]` declares scheduled work on runner classes.
- **Automatic discovery:** app task paths and package metadata are scanned.
- **Task execution:** `TaskRunner` matches schedules and dispatches tasks.
- **Distributed locking:** Redis-backed exclusivity is available across replicas.
- **CLI control:** `ScheduleCommand` covers work, run, list, and task inspection.

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

[](#installation)

```
composer require switon/schedule
```

Quick Start
-----------

[](#quick-start)

```
use Switon\Core\RunnerInterface;
use Switon\Schedule\Attribute\Scheduled;

#[Scheduled('0 * * *', lockTtl: 60)]
final class PurgeStaleSessionsTask implements RunnerInterface
{
    public function run(mixed $payload): mixed
    {
        return null;
    }
}
```

```
bash bin/console schedule:list
bash bin/console schedule:run
```

Docs:

License
-------

[](#license)

MIT.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance87

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

48d ago

### Community

Maintainers

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

---

Top Contributors

[![switon-php](https://avatars.githubusercontent.com/u/247358032?v=4)](https://github.com/switon-php "switon-php (5 commits)")

---

Tags

scheduleschedulerswitontasksschedulerscheduleTasksswiton

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/switon-schedule/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k455.6M9.9k](/packages/symfony-dependency-injection)[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k8.8M207](/packages/deptrac-deptrac)[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.5k1.5M107](/packages/mcp-sdk)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M425](/packages/drupal-core-recommended)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

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