PHPackages                             jackchow/simple-task - 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. jackchow/simple-task

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

jackchow/simple-task
====================

a simple-task

v1.7(3y ago)0218MITPHPPHP &gt;=7.0.0

Since Sep 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jackchow123456/simple-task)[ Packagist](https://packagist.org/packages/jackchow/simple-task)[ Docs](https://github.com/jackchow123456/simple-task)[ RSS](/packages/jackchow-simple-task/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (5)Versions (8)Used By (0)

SimpleTask
----------

[](#simpletask)

> SimpleTask 是一个简单的异步队列任务列表管理器，致力于解决耗时较长的任务（如：生成数据/导出表单之类...），依赖于 `laravel`

安装
--

[](#安装)

```
composer require jackchow/simple-task

```

配置
--

[](#配置)

```
php artisan vendor:publish --provider="JackChow\SimpleTask\SimpleTaskServiceProvider"

```

配置文件 `config/simpletask.php` 会生成，你可以在这里修改应用默认的配置.

同时，会生成 migrations 数据库迁移文件。

快速开始
----

[](#快速开始)

1. 该包主要使用 laravel 内置的队列管理，如果不太了解，[请移步](https://learnku.com/docs/laravel/7.x)
2. 运行 `php artisan queue:work` 命令，开启任务监听进程。Tip：任何代码改动都需要重启该进程，否则不会生效.

### 示例代码

[](#示例代码)

Test.php

```
use JackChow\SimpleTask\SimpleTask;

class Test
{
    public function index()
    {
        $task = new SimpleTask();

        // 创建任务
        $task->initialize([
            'name' => '测试任务 - 导出2020年9月份订单数据', // 任务名称
            'type' => '导出任务', // 任务类型（标识/描述）
            'creator_id' => 0,  // 发起者id
            'params' => ['the_month' => '2020-09'], // 任务参数
            'params_desc' => '所属月份：2020-09', // 参数描述
        ])->handle(TestJob::class);

        // 获取任务列表
        SimpleTask::model()->all();

        // 获取当前是否有任务进行
        SimpleTask::isProcessing();
        SimpleTask::name('测试任务 - 导出2020年9月份订单数据')->isProcessing();
        SimpleTask::name('测试任务 - 导出2020年9月份订单数据')->creator(0)->isProcessing();

        // 查询指定任务是否已创建
        SimpleTask::name('测试任务 - 导出2020年9月份订单数据')->creator(0)->isCreated();
    }
}

```

TestJob.php

```
use JackChow\SimpleTask\SimpleTaskJob;

class TestJob extends SimpleTaskJob
{
    // 处理任务的逻辑
    public function deal()
    {
        // do something ...
    }
}

```

### 提示

[](#提示)

本队列默认超市时间为 10 分钟， 若超过该时间进程将会被kill掉.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Recently: every ~191 days

Total

7

Last Release

1301d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65cf574c970acb8b7abb798b49af192e6ea33629b30a5a7edd942672ca4282b9?d=identicon)[jackchow123456](/maintainers/jackchow123456)

---

Top Contributors

[![jackchow123456](https://avatars.githubusercontent.com/u/29397015?v=4)](https://github.com/jackchow123456 "jackchow123456 (12 commits)")

---

Tags

laraveltask

### Embed Badge

![Health badge](/badges/jackchow-simple-task/health.svg)

```
[![Health](https://phpackages.com/badges/jackchow-simple-task/health.svg)](https://phpackages.com/packages/jackchow-simple-task)
```

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)

PHPackages © 2026

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