Skip to content

longxinH/swoole-timers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swoole-timers

swoole 异步定时任务器

##环境依赖

  • Swoole 1.8.x+
  • PHP 5.4+
  • Composer
  • Redis

##基础组件


#快速开始

 composer install

由于composer需要翻墙下载packagist镜像,墙内的同学可以使用如下方法

 git clone https://github.com/longxinH/swoole-rpc.git
 cd swoole-rpc/
 composer install

swoole-timers/service/timers.php文件中

 include 'youpath/vendor/autoload.php';

swoole-timers/admin/index.php文件中

 include 'youpath/vendor/autoload.php';

##运行redis

redis-server

##运行服务指令

 start | stop | reload | restart | help

##运行定时服务

 cd swoole-timers/service/
 php timers.php start

##访问管理地址

http://localhost/swoole-timers/admin/

##定时任务规则

  1. 支持域名地址。
  2. 暂时只支持PHP语法的脚本。忽略php开始<?php和结束标签 ?>
file_put_contents('/tmp/t.log', date('Y-m-d H:i:s') . PHP_EOL, FILE_APPEND);

#感谢

About

swoole 异步定时任务器

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published