PHPackages                             tntma/webman-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. tntma/webman-task

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

tntma/webman-task
=================

 dynamic crontab task plugin for webman.

1.0.4(2y ago)02.2kMITPHPPHP &gt;=7.2.5

Since Feb 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/TNT-ma/webmantask)[ Packagist](https://packagist.org/packages/tntma/webman-task)[ RSS](/packages/tntma-webman-task/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

动态秒级定时任务
========

[](#动态秒级定时任务)

概述
--

[](#概述)

基于 **webman** + **TP-ORM** 的动态秒级定时任务管理，兼容 Windows 和 Linux 系统。

安装

```

```

简单使用
----

[](#简单使用)

```
   $param = [
     'method' => 'crontabIndex',//计划任务列表
     'args'   => ['limit' => 10, 'page' => 1]//参数
    ];
   $result= yzh52521\Task\Client::instance()->request($param);
   return json($result);

```

计划任务列表
------

[](#计划任务列表)

### 方法名

[](#方法名)

**method：** crontabIndex

### 请求参数

[](#请求参数)

**args**

参数名称是否必须示例备注page是1页码limit是15每页条数### 返回数据

[](#返回数据)

```
{
"code": 200,
"msg": "ok",
"data": {
"total": 4,
"per_page": 15,
"current_page": 1,
"last_page": 1,
"data": [
{
"id": 6,
"title": "class任务 每月1号清理所有日志",
"type": 2,
"rule": "0 0 1 * *",
"target": "app\\common\\crontab\\ClearLogCrontab",
"parameter": "",
"running_times": 71,
"last_running_time": 1651121710,
"remark": "",
"sort": 0,
"status": 1,
"create_time": 1651114277,
"update_time": 1651114277,
"singleton": 1
},
{
"id": 5,
"title": "eavl任务 输出 hello world",
"type": 4,
"rule": "* * * * *",
"target": "echo 'hello world';",
"parameter": "",
"running_times": 25,
"last_running_time": 1651121701,
"remark": "",
"sort": 0,
"status": 1,
"create_time": 1651113561,
"update_time": 1651113561,
"singleton": 0
},
{
"id": 3,
"title": "url任务 打开 workerman 网站",
"type": 3,
"rule": "*/20 * * * * *",
"target": "https://www.workerman.net/",
"parameter": "",
"running_times": 39,
"last_running_time": 1651121700,
"remark": "请求workerman网站",
"sort": 0,
"status": 1,
"create_time": 1651112925,
"update_time": 1651112925,
"singleton": 0
},
{
"id": 1,
"title": "command任务 输出 webman 版本",
"type": 1,
"rule": "*/20 * * * * *",
"target": "version",
"parameter": null,
"running_times": 112,
"last_running_time": 1651121700,
"remark": "20秒",
"sort": 0,
"status": 1,
"create_time": 1651047480,
"update_time": 1651047480,
"singleton": 1
}
]
}
}
```

计划任务日志列表
--------

[](#计划任务日志列表)

**method：** crontabLog

### 请求参数

[](#请求参数-1)

**args**

参数名称是否必须示例备注page是1页码limit是15每页条数crontab\_id否1计划任务ID### 返回数据

[](#返回数据-1)

```
{
  "code": 200,
  "msg": "ok",
  "data": {
    "total": 97,
    "per_page": 15,
    "current_page": 1,
    "last_page": 7,
    "data": [
      {
        "id": 257,
        "crontab_id": 1,
        "target": "version",
        "parameter": "",
        "exception": "Webman-framework v1.3.11",
        "return_code": 0,
        "running_time": "0.834571",
        "create_time": 1651123800,
        "update_time": 1651123800
      },
      {
        "id": 251,
        "crontab_id": 1,
        "target": "php webman version",
        "parameter": "",
        "exception": "Webman-framework v1.3.11",
        "return_code": 0,
        "running_time": "0.540384",
        "create_time": 1651121700,
        "update_time": 1651121700
      },
      {
        "id": 246,
        "crontab_id": 1,
        "target": "php webman version",
        "parameter": "{}",
        "exception": "Webman-framework v1.3.11",
        "return_code": 0,
        "running_time": "0.316019",
        "create_time": 1651121640,
        "update_time": 1651121640
      },
      {
        "id": 244,
        "crontab_id": 1,
        "target": "php webman version",
        "parameter": "{}",
        "exception": "Webman-framework v1.3.11",
        "return_code": 0,
        "running_time": "0.493848",
        "create_time": 1651121580,
        "update_time": 1651121580
      }
    ]
  }
}
```

添加任务
----

[](#添加任务)

**method：** crontabCreate

### 请求参数

[](#请求参数-2)

**args**

参数名称参数类型是否必须示例备注titletext是输出 webman 版本任务标题typetext是1任务类型 (1 command, 2 class, 3 url, 4 eval ,5 shell)ruletext是\*/3 \* \* \* \* \*任务执行表达式targettext是php webman version/ version调用任务字符串parametertext否{}调用任务参数(url和eval无效)remarktext是每3秒执行备注sorttext是0排序statustext是1状态\[0禁用; 1启用\]singletontext否1是否单次执行 \[0 是 1 不是\]### 返回数据

[](#返回数据-2)

```
{
  "code": 200,
  "msg": "ok",
  "data": {

  }
}
```

重启任务
----

[](#重启任务)

**method：** crontabReload

### 请求参数

[](#请求参数-3)

**args**

参数名称参数类型是否必须示例备注idtext是1,2计划任务ID 多个逗号隔开### 返回数据

[](#返回数据-3)

```
{
  "code": 200,
  "msg": "ok",
  "data": {

  }
}
```

修改任务
----

[](#修改任务)

**method：** crontabUpdate

### 请求参数

[](#请求参数-4)

**args**

参数名称参数类型是否必须示例备注idtext是1titletext否输出 webman 版本任务标题typetext否1任务类型 (1 command, 2 class, 3 url, 4 eval，5 shell)ruletext否\*/3 \* \* \* \* \*任务执行表达式targettext否php webman version/version调用任务字符串parametertext否{}调用任务参数(url和eval无效)remarktext否每3秒执行备注sorttext否0排序statustext否1状态\[0禁用; 1启用\]singletontext否1是否单次执行 \[0 是 1 不是\]### 返回数据

[](#返回数据-4)

```
{
  "code": 200,
  "msg": "ok",
  "data": {

  }
}
```

删除任务
----

[](#删除任务)

**method：** crontabDelete

### 请求参数

[](#请求参数-5)

**args**

参数名称参数类型是否必须示例备注idtext是1,2计划任务ID 多个逗号隔开### 返回数据

[](#返回数据-5)

```
{
  "code": 200,
  "msg": "ok",
  "data": {

  }
}

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Total

4

Last Release

930d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f3696f5a24d3824d00c87143d635039bfcd6a40ae92e09c4b4532bdcc6ca8706?d=identicon)[TNTma](/maintainers/TNTma)

---

Top Contributors

[![TNT-ma](https://avatars.githubusercontent.com/u/114092831?v=4)](https://github.com/TNT-ma "TNT-ma (1 commits)")

---

Tags

taskcrontabwebman

### Embed Badge

![Health badge](/badges/tntma-webman-task/health.svg)

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

###  Alternatives

[phing/phing

PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.

1.2k21.7M876](/packages/phing-phing)[mult1mate/cron-manager

Flexible cron tasks manager for MVC-type applications

40338.5k3](/packages/mult1mate-cron-manager)[laravel-admin-ext/scheduling

Task scheduling extension for laravel-admin

93247.1k6](/packages/laravel-admin-ext-scheduling)[yzh52521/webman-task

 dynamic crontab task plugin for webman.

171.9k2](/packages/yzh52521-webman-task)[arara/process

Provides a better API to work with processes on Unix-like systems

16861.7k2](/packages/arara-process)[rewieer/taskschedulerbundle

Task Scheduler with CRON for Symfony

63242.1k](/packages/rewieer-taskschedulerbundle)

PHPackages © 2026

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