PHPackages                             cjs/cron - 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. cjs/cron

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

cjs/cron
========

The cjs cron package.

1.0.0(9y ago)03951MITPHPPHP &gt;=5.4.0

Since Mar 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jellycheng/cjsCron)[ Packagist](https://packagist.org/packages/cjs/cron)[ Docs](http://www.chengjinsheng.com)[ RSS](/packages/cjs-cron/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (1)

本类是采用crontab 表达式，5段和6段式
-----------------------

[](#本类是采用crontab-表达式5段和6段式)

```
5段式： 分 时 日 月 周    --推荐这种
6段式： 分 时 日 月 周 年

例子：
# 每月的最后1天
0 0 L * * *

说明：
Linux
*    *    *    *    *    *
-    -    -    -    -    -
|    |    |    |    |    |
|    |    |    |    |    + year [optional，可选]
|    |    |    |    +----- day of week (0 - 7) (Sunday=0 or 7)
|    |    |    +---------- month (1 - 12)
|    |    +--------------- day of month (1 - 31)
|    +-------------------- hour (0 - 23)
+------------------------- min (0 - 59)

```

Cron表达式生成器
----------

[](#cron表达式生成器)

```
1. 5段式： 分 时 日 月 周
2. 6段式： 秒 分 时 日 月 周   或者 分 时 日 月 周 年
3. 7段式： 秒 分 时 日 月 周 年

秒（0~59）
分钟（0~59）
小时（0~23）
日（0~31，需要考虑当月的天数, 天 Day-of-Month）
月份（0~11）
周（星期）（1~7 1=SUN 或 SUN，MON，TUE，WED，THU，FRI，SAT, 周 Day-of-Week）
年份（1970－2099）

字段   允许值   允许的特殊字符
秒         0-59         , - * /
分         0-59         , - * /
小时       0-23         , - * /
日       1-31         , - * ? / L W C
月份       1-12 或者 JAN-DEC         , - * /
周（星期）  1-7 或者 SUN-SAT         , - * ? / L C #
年（可选）  留空, 1970-2099         , - * /

,：表示列出枚举值，如"5,20, 25"
-：表示指定范围
*：代表所有可能的值，如每秒，每分，每时，每日，每月，每周，每年，也可理解为不限，任意时刻
/：用于指定增量，格式"起始值/每隔值"，如 "5/15”表示从5分钟开始，每15分钟执行一次（表5、20、35、50分别触发一次）
    如果在周段（开始星期几/结束星期几，值范围是1～7）
?：解决冲突使用的符号，在日和周位置使用，表不指定
L：表最后的意思（last），在日和周上使用，分别表当月最后一天（即1月为31，2月为28或29，4月30）、当前星期最后一天（即7或SAT）
        7L表本月最后一个星期日（在周段位可设置值范围1L～7L）
W：用来描叙最接近指定天的工作日（周一到周五），值范围1W～31W
C：
#：指定这个月的第几周的星期几，格式： "这个月的第几周#星期几"，#号前的值范围1～4，#号后的值范围1～7，如 "2#3"表第2周的星期三

```

java spring计划任务采用7段式
--------------------

[](#java-spring计划任务采用7段式)

```
Java(Spring)
*    *    *    *    *    *    *
-    -    -    -    -    -    -
|    |    |    |    |    |    |
|    |    |    |    |    |    + year [optional]
|    |    |    |    |    +----- day of week (0 - 7) (Sunday=0 or 7)
|    |    |    |    +---------- month (1 - 12)
|    |    |    +--------------- day of month (1 - 31)
|    |    +-------------------- hour (0 - 23)
|    +------------------------- min (0 - 59)
+------------------------------ second (0 - 59)

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3397d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5674717?v=4)[jellycheng](/maintainers/jellycheng)[@jellycheng](https://github.com/jellycheng)

---

Top Contributors

[![jellycheng](https://avatars.githubusercontent.com/u/5674717?v=4)](https://github.com/jellycheng "jellycheng (2 commits)")

### Embed Badge

![Health badge](/badges/cjs-cron/health.svg)

```
[![Health](https://phpackages.com/badges/cjs-cron/health.svg)](https://phpackages.com/packages/cjs-cron)
```

PHPackages © 2026

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