PHPackages                             guanhui07/dcr-swoole-crontab - 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. guanhui07/dcr-swoole-crontab

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

guanhui07/dcr-swoole-crontab
============================

A crontab component base on swoole.

1.1.2(1y ago)1411MITPHPPHP ^7.1 || ^8.0

Since Feb 2Pushed 1y agoCompare

[ Source](https://github.com/guanhui07/dcr-swoole-crontab)[ Packagist](https://packagist.org/packages/guanhui07/dcr-swoole-crontab)[ RSS](/packages/guanhui07-dcr-swoole-crontab/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (1)

dcr-swoole-crontab
==================

[](#dcr-swoole-crontab)

A crontab component base on swoole.

声明
--

[](#声明)

核心逻辑来自于 [Hyperf](https://hyperf.io) 的 [hyperf/crontab](https://github.com/hyperf/crontab) 组件。非常感谢 Hyperf 为大家提供这么优的组件。

Requirement
-----------

[](#requirement)

- PHP &gt;= 7.1
- [Composer](https://getcomposer.org/)

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

[](#installation)

`composer require  guanhui07/dcr_swoole_crontab`

Documents
---------

[](#documents)

- [swoole](https://wiki.swoole.com/#/)
- [hyperf/crontab](https://hyperf.wiki/2.0/#/zh-cn/crontab?id=%e5%ae%9a%e6%97%b6%e4%bb%bb%e5%8a%a1)

Usage
-----

[](#usage)

1. 在 `event.php` 里为 `swoole.init` 事件添加监听类。

```
return [
...
    'listem' => [
        ...
        'swoole.init' => [
            ...
            \DcrSwooleCrontab\Process\CrontabDispatcherProcess::class,
            ...
        ],
        ...
    ],
...
];

或 在启动脚本加
$crontab = new CrontabDispatcherProcess();
$crontab->handle();

```

2. 在配置文件 `crontab.php` 里添加 `crontab` 实例。

```
return [
    'crontab' => [
        (new \DcrSwooleCrontab\Crontab())->setName('test-1')
            ->setRule('* * * * * *')
            ->setCallback([Test::class, 'run'])
            ->setMemo('just a test crontab'),
        (new \DcrSwooleCrontab\Crontab())->setName('test-2')
            ->setRule('* * * * * *')
            ->setCallback([Test::class, 'run'])
            ->setMemo('just another test crontab'),
    ],
];
```

License
-------

[](#license)

MIT

我的其他包：
------

[](#我的其他包)

 借鉴Laravel实现的 PHP Framework ，FPM模式、websocket使用的workerman、支持容器、PHP8特性attributes实现了路由注解、中间件注解、Laravel Orm等特性

 Swoole模式下 Redis连接池

 facade、门面 fpm模式下可使用

 基于swoole实现的crontab秒级定时任务

 基于 illuminate/database 做的连接池用于适配Swoole的协程环境

 高性能PHP Framework ，Cli模式，基于Swoole实现，常驻内存，协程框架，支持容器、切面、PHP8特性attributes实现了路由注解、中间件注解、支持Laravel Orm等特性

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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 ~158 days

Total

5

Last Release

607d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5820457?v=4)[royee](/maintainers/guanhui07)[@guanhui07](https://github.com/guanhui07)

---

Tags

crontabphpswoole

### Embed Badge

![Health badge](/badges/guanhui07-dcr-swoole-crontab/health.svg)

```
[![Health](https://phpackages.com/badges/guanhui07-dcr-swoole-crontab/health.svg)](https://phpackages.com/packages/guanhui07-dcr-swoole-crontab)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)

PHPackages © 2026

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