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 yesterday

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 21% 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

3159d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/490287?v=4)[anyhome](/maintainers/ayhome)[@ayhome](https://github.com/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

[seld/cli-prompt

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

24726.4M22](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

13045.3M6.2k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71464.1k9](/packages/styleci-cli)[winbox/args

Windows command-line formatter

20718.9k21](/packages/winbox-args)

PHPackages © 2026

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