All Projects → osgochina → Swoole Crontab

osgochina / Swoole Crontab

基于swoole的定时器程序,支持秒级处理

Projects that are alternatives of or similar to Swoole Crontab

TT Jobs
基于 Swoole 定时管理系统
Stars: ✭ 22 (-97.56%)
Mutual labels:  crontab, swoole
fast-laravel
基于Swoole的高性能HTTP服务器,加速您Laravel应用程序。
Stars: ✭ 33 (-96.33%)
Mutual labels:  crontab, swoole
W7 Rangine Empty
软擎是基于 Php 7.2+ 和 Swoole 4.4+ 的高性能、简单易用的开发框架。支持同时在 Swoole Server 和 php-fpm 两种模式下运行。内置了 Http (Swoole, Fpm),Tcp,WebSocket,Process,Crontab服务。集成了大量成熟的组件,可以用于构建高性能的Web系统、API、中间件、基础服务等等。
Stars: ✭ 246 (-72.67%)
Mutual labels:  crontab, swoole
sw crontab
基于swoole的定时器程序,支持秒级处理,去中心化架构,可横向扩展
Stars: ✭ 24 (-97.33%)
Mutual labels:  crontab, swoole
Imi
imi 是基于 Swoole 的 PHP 协程开发框架,它支持 Http、Http2、WebSocket、TCP、UDP、MQTT 等主流协议的服务开发,特别适合互联网微服务、即时通讯聊天im、物联网等场景!。QQ群:17916227
Stars: ✭ 680 (-24.44%)
Mutual labels:  swoole
Swoole study
一份Swoole入门教程,根据作者的个人理解编写,常见的Swoole入门知识和讲解。
Stars: ✭ 509 (-43.44%)
Mutual labels:  swoole
Swoolefy
swoolefy是一个基于swoole实现的轻量级、高性能、协程级、开放性的API应用服务框架
Stars: ✭ 495 (-45%)
Mutual labels:  swoole
Fashop
php开源商城系统,基于swoole、easyswoole框架开发
Stars: ✭ 485 (-46.11%)
Mutual labels:  swoole
Zys
high performance service framework based on Yaf or Swoole
Stars: ✭ 812 (-9.78%)
Mutual labels:  swoole
Dynamic Wallpaper
A simple bash script to set wallpapers according to current time, using cron job scheduler.
Stars: ✭ 762 (-15.33%)
Mutual labels:  crontab
Swoft
🚀 PHP Microservice Full Coroutine Framework
Stars: ✭ 5,420 (+502.22%)
Mutual labels:  swoole
Wecron
✔️ 微信上的定时提醒 - Cron on WeChat
Stars: ✭ 537 (-40.33%)
Mutual labels:  crontab
Ocsystem
🚀ONLYCHAIN blockchain underlying system-OCSystem
Stars: ✭ 713 (-20.78%)
Mutual labels:  swoole
Tarsphp
基础目录,聚合所有其他目录,包含文档和例子
Stars: ✭ 505 (-43.89%)
Mutual labels:  swoole
One
一个极简高性能php框架,支持[swoole | php-fpm ]环境
Stars: ✭ 789 (-12.33%)
Mutual labels:  swoole
Cms
Feehi CMS based on yii2
Stars: ✭ 493 (-45.22%)
Mutual labels:  swoole
Hookphp
HookPHP基于C扩展搭建内置AI编程的架构系统-支持微服务部署|热插拔业务组件-集成业务模型|权限模型|UI组件库|多模板|多平台|多域名|多终端|多语言-含常驻内存|前后分离|API平台|LUA QQ群:679116380
Stars: ✭ 575 (-36.11%)
Mutual labels:  swoole
Cron Utils
Cron utils for parsing, validations and human readable descriptions as well as date/time interoperability.
Stars: ✭ 724 (-19.56%)
Mutual labels:  crontab
Swoole Jobs
🚀Dynamic multi process worker queue base on swoole, like gearman but high performance.
Stars: ✭ 574 (-36.22%)
Mutual labels:  swoole
Ncrontab
Crontab for .NET
Stars: ✭ 566 (-37.11%)
Mutual labels:  crontab

Swoole-Crontab(基于Swoole扩展)

1.概述

  • 基于swoole的定时器程序,支持秒级处理.
  • 异步多进程处理。
  • 完全兼容crontab语法,且支持秒的配置,可使用数组规定好精确操作时间
  • 单中心-多客户端模式,能够横向扩展
  • web界面管理,增删改查任务,完整的权限控制.
  • 请使用swoole扩展1.8.0+
  • v0.8版本入口

2.架构图

3.Crontab配置

介绍一下时间配置

0   1   2   3   4   5
|   |   |   |   |   |
|   |   |   |   |   +------ day of week (0 - 6) (Sunday=0)
|   |   |   |   +------ month (1 - 12)
|   |   |   +-------- day of month (1 - 31)
|   |   +---------- hour (0 - 23)
|   +------------ min (0 - 59)
+-------------- sec (0-59)[可省略,如果没有0位,则最小时间粒度是分钟]

4.开始使用

1.修改配置

1.1 中心服配置

/path/to/src/center/configs/dev/db.php 修改数据库配置
进入mysql数据库执行/path/to/doc/crontab.sql 的sql文件
src/center/_init.php   修改 PUBLIC_PATH   swoole framework框架所在的路径

1.2 admin管理后台的配置文件修改

src/admin/configs/dev/db.php  修改数据库配置
src/admin/configs/dev/service.php  中心服启动时候监听的ip端口,需要跟中心服通讯
src/public/index.php  
    修改 WEBROOT       域名
    修改 PUBLIC_PATH   swoole framework框架所在的路径

2.下载swoole framework框架到本地/data/www/public/ framework

3.配置nginx,列子如下:

server {
    listen       80;
    server_name  crontab.test.com;
    
    root /data/www/wwwroot/swoole-crontab/src/public;
    
    index index.php index.html;
    location / {
        if (!-e $request_filename) {
            rewrite ^/(.*)$ /index.php;
        }
    }
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

}

4.启动中心服

/path/to/php /path/to/src/center/center.php  start -d -h 127.0.0.1 -p 8901

5.启动客户端

-h 是指中心服地址 -p 中心服端口
/path/to/php /path/to/src/agent/agent.php start -d -h 127.0.0.1 -p 8901

6.web界面访问

输入nginx配置的地址访问web界面,默认用户名/密码是admin/admin

7.操作步骤

请按照以上步骤操作,因为admin后台是通过接口连接上中心服来进行管理.所以必须先启动中心服,再打开admin管理后台

4.使用交流

1.后台截图

2.更加清晰的架构图.感谢@xufei100

QQ群:560807006

5.TODO

  • [ ] 去除nginx依赖
  • [ ] 配置文件统一
  • [ ] 去除swoole framework框架的依赖
  • [ ] restful api接口
  • [ ] 通过命令行管理任务
  • [ ] 无中心服依赖
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].