定制 guanhui07/dcr-swoole-crontab 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

guanhui07/dcr-swoole-crontab

最新稳定版本:1.1.2

Composer 安装命令:

composer require guanhui07/dcr-swoole-crontab

包简介

A crontab component base on swoole.

README 文档

README

A crontab component base on swoole.

声明

核心逻辑来自于 Hyperfhyperf/crontab 组件。非常感谢 Hyperf 为大家提供这么优的组件。

Requirement

Installation

composer require guanhui07/dcr_swoole_crontab

Documents

Usage

  1. event.php 里为 swoole.init 事件添加监听类。
return [
...
    'listem' => [
        ...
        'swoole.init' => [
            ...
            \DcrSwooleCrontab\Process\CrontabDispatcherProcess::class,
            ...
        ],
        ...
    ],
...
];

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


  1. 在配置文件 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

MIT

我的其他包:

https://github.com/guanhui07/dcr 借鉴Laravel实现的 PHP Framework ,FPM模式、websocket使用的workerman、支持容器、PHP8特性attributes实现了路由注解、中间件注解、Laravel Orm等特性

https://github.com/guanhui07/redis Swoole模式下 Redis连接池

https://github.com/guanhui07/facade facade、门面 fpm模式下可使用

https://github.com/guanhui07/dcr-swoole-crontab 基于swoole实现的crontab秒级定时任务

https://github.com/guanhui07/database 基于 illuminate/database 做的连接池用于适配Swoole的协程环境

https://github.com/guanhui07/dcr-swoole 高性能PHP Framework ,Cli模式,基于Swoole实现,常驻内存,协程框架,支持容器、切面、PHP8特性attributes实现了路由注解、中间件注解、支持Laravel Orm等特性

统计信息

  • 总下载量: 41
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固