PHPackages                             hectorqin/php-resque - 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. [Caching](/categories/caching)
4. /
5. hectorqin/php-resque

ActiveLibrary[Caching](/categories/caching)

hectorqin/php-resque
====================

Redis backed library for creating background jobs and processing them later. Based on resque for Ruby.

v1.2.4(4y ago)48051MITPHPPHP &gt;=7.0.0

Since Sep 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/hectorqin/php-resque)[ Packagist](https://packagist.org/packages/hectorqin/php-resque)[ Docs](https://github.com/hectorqin/php-resque)[ RSS](/packages/hectorqin-php-resque/feed)WikiDiscussions master Synced 5d ago

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

PHP-Resque
==========

[](#php-resque)

- [PHP-Resque](#php-resque)
    - [安装](#%E5%AE%89%E8%A3%85)
    - [配置](#%E9%85%8D%E7%BD%AE)
    - [使用](#%E4%BD%BF%E7%94%A8)
        - [启动worker](#%E5%90%AF%E5%8A%A8worker)
        - [投递任务](#%E6%8A%95%E9%80%92%E4%BB%BB%E5%8A%A1)
            - [简单任务](#%E7%AE%80%E5%8D%95%E4%BB%BB%E5%8A%A1)
            - [自定义任务](#%E8%87%AA%E5%AE%9A%E4%B9%89%E4%BB%BB%E5%8A%A1)
        - [监听事件](#%E7%9B%91%E5%90%AC%E4%BA%8B%E4%BB%B6)
        - [快捷投递任务](#%E5%BF%AB%E6%8D%B7%E6%8A%95%E9%80%92%E4%BB%BB%E5%8A%A1)

在 [chrisboulton/php-resque](https://github.com/chrisboulton/php-resque) 的基础上进行了如下改造：

- 采用psr-4自动加载规范
- 合并 php-resque-scheduler
- 新增自定义处理方法worker
- 支持自定义worker
- 支持redis扩展及Predis扩展
- 支持Timer定时器功能
- 支持Crontab定时任务功能
- 支持ThinkPHP5/6命令行使用
- 支持THinkPHP3.2控制器CLI模式使用
- 提供Controller trait便于其它框架启动worker
- 提供MagicCall trait便于提交队列任务

安装
--

[](#安装)

```
composer require hectorqin/php-resque
```

配置
--

[](#配置)

TP5/6 默认获取 resque 配置文件, TP3.2 默认获取 RESQUE\_CONFIG 配置

```
