PHPackages                             ayhome/gm-cli - 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. [CLI &amp; Console](/categories/cli)
4. /
5. ayhome/gm-cli

ActiveLibrary[CLI &amp; Console](/categories/cli)

ayhome/gm-cli
=============

gm-cli for php

v0.1.0(8y ago)020Apache-2.0PHPPHP &gt;=5.6.0

Since Nov 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ayhome/gm-cli)[ Packagist](https://packagist.org/packages/ayhome/gm-cli)[ RSS](/packages/ayhome-gm-cli/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

**简要描述：**

定时器，兼容crontab表达式，并精确到秒 `0 0 */20 * * *`每20分钟执行一次 `*、10 * * * * *`每10秒执行一次。

**例子**

```
//每20分词执行一次，
$crontab = new \ayhome\cli\Ticker();
$crontab->When('0 0 */20 * * *')
->Then(function ($userParams)
{
    echo 'crontab called';
    return false;//return false if you want to cancle this cron.
}, $userParams);
```

```
//cron表达式说明
//表达式 :
//   *                       0     1    2    3    4    5
//   *                       *     *    *    *    *    *
//   *                       -     -    -    -    -    -
//   *                       |     |    |    |    |    |
//   *                       |     |    |    |    |    +----- 每周几 (0 - 6) (Sunday=0)
//   *                       |     |    |    |    +----- 几月 (1 - 12)
//   *                       |     |    |    +------- 几号 (1 - 31)
//   *                       |     |    +--------- 时 (0 - 23)
//   *                       |     +----------- 分 (0 - 59)
//   *                       +------------- 秒 (0-59) (可选)
//当如果使用5个参数的时候则表示最小单位为分钟，即和linux crontab的表达式一样，当使用6个参数时，则表示精确到秒。

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3108d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0aad496bd3f3648f041ddebb82156f03473f73306ad0eb2193d9ceca7f17b806?d=identicon)[ayhome](/maintainers/ayhome)

### Embed Badge

![Health badge](/badges/ayhome-gm-cli/health.svg)

```
[![Health](https://phpackages.com/badges/ayhome-gm-cli/health.svg)](https://phpackages.com/packages/ayhome-gm-cli)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M319](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M18](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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