Documentation ¶
Overview ¶
Package cron 实现了 cron 表达式的 Scheduler 接口
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse 根据 spec 初始化 schedulers.Scheduler
spec 表示 crontab 的格式
区分大小写,支持秒,其格式如下:
- * * * * * | | | | | | | | | | | --- 星期 | | | | ----- 月 | | | ------- 日 | | --------- 小时 | ----------- 分 ------------- 秒
星期与日若同时存在,则以或的形式组合。
支持以下符号:
- 表示范围 , 表示和
同时支持以下便捷指令:
@reboot: 启动时执行一次 @yearly: 0 0 0 1 1 * @annually: 0 0 0 1 1 * @monthly: 0 0 0 1 * * @weekly: 0 0 0 * * 0 @daily: 0 0 0 * * * @midnight: 0 0 0 * * * @hourly: 0 0 * * * *
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.