┌──────────── [可选] 秒 (0 - 59) | ┌────────── 分 (0 - 59) | | ┌──────── 时 (0 - 23) | | | ┌────── 每月几号 (1 - 31) | | | | ┌──── 月 (1 - 12) OR jan,feb,mar,apr ... | | | | | ┌── 周几 (0 - 6, 星期天=0) 或者 sun,mon ... | | | | | | * * * * * * 命令
符号 | 说明 | 举例 | 等效 |
---|---|---|---|
* | Any value | * * * * | Every minute |
- | Range of values | 1-10 * * * | Minutes 1 through 10 |
, | List of values | 1,10 * * * | At minutes 1 and 10 |
/ | Step values | */10 * * * | Every 10 minutes |
@yearly | Once every year at midnight of 1 January | @yearly | 0 0 1 1 * |
@annually | Same as @yearly | @annually | 0 0 1 1 * |
@monthly | Once a month at midnight on the first day | @monthly | 0 0 1 * * |
@weekly | Once a week at midnight on Sunday morning | @weekly | 0 0 * * 0 |
@daily | Once a day at midnight | @daily | 0 0 * * * |
@midnight | Same as @daily | @midnight | 0 0 * * * |
@hourly | Once an hour at the beginning of the hour | @hourly | 0 * * * * |
@reboot | Run at startup |
|