库
库地址:https://github.com/robfig/cron
cron语法
It accepts
- Standard crontab specs, e.g. "* * * * ?"
- Descriptors, e.g. "@midnight", "@every 1h30m"
Background - Cron spec format
There are two cron spec formats in common usage:
- The "standard" cron format, described on the Cron wikipedia page and used by the cron Linux system utility.
- The cron format used by the Quartz Scheduler, commonly used for scheduled jobs in Java software
The original version of this package included an optional "seconds" field, which made it incompatible with both of these formats. Now, the "standard" format is the default format accepted, and the Quartz format is opt-in.
- linux的语法链接:【转】cron表达式详解
- the Quartz Scheduler链接:the Quartz Scheduler
用法
- 0 15 10 L * ? 每月最后一日的上午10:15触发