Linux Crontab语法
2015-07-06 14:15
555 查看
Crontab语法
Lists
链表值: 逗号
,表示并列,要依次序;Examples:
"1,2,5,9", "0-4,8-12".
Ranges of numbers
区间值: 连字符
-, 'a-b'表示[a, b]区间的每个整值.
Asterisk
*遍历值 :
*或者
*/1表示
基本单位步长的
区间值"first through last"., 即
minute用*表示没分钟
hour用*表示每小时
day用* 表示每日
month用* 表示每月
dow用* 表示每周的这一天.
Step values /n
步长值 /n
Conjunction with ranges与区间值复合使用 :
*/n, n表示间隔长度. Example, "0-23/2" can be used in the hours field to specify command execution every other hour.
Steps are also permitted after an asterisk. 步长值与遍历值结合使用. Example so if you want to say "every two hours", you can use "*/2".
Names
缩写值:
Month和
Weekcan also be used for the "month" and "day of week" fields.
Use the
first three lettersof the particular
dayor
month(case doesn't matter). 单词3首字母, 不分大小写.
Ranges or lists of names are not allowed.不能使用
区间值和
链表值.
组合使用:
-优先级高于
/, 如
a-b/c(day)每隔
c天的
a到
b之间执行操作.
<minute> <hour> <day> <month> <dow> <command>
第1列 第2列 3 4 5 6
第1列: 分钟1~59 每分钟用`*`或者` */1`表示
第2列: 小时1~23(0表示0点)
第3列: 日期1~31
第4列: 月份1~12
第5列: 星期0~6(0表示星期天)
第6列: 要运行的命令
相关文章推荐
- DCE HOWTO linux netlink working with routing table
- linux之grep用法
- linux0.12之内核代码之fork.c说明
- CentOS下添加新硬盘并分区格式化
- linux0.12之内存管理(2)-再理解分段分页
- Linux运维系统工程师系列---22
- 转:linux下nagios安装与配置
- 我使用过的Linux命令之date - 显示、修改系统日期时间(转)
- linux解压war包的命令
- Linux下查看文件和文件夹大小
- Linux常用命令记录
- linux 退出vi
- 重置ubuntu的密码: Reset root password (Ubuntu Linux) without CD
- Linux物理内存管理概述
- Linux echo 命令
- Linux用户空间与内核空间
- Linux-Tmux使用初体验
- linux驱动开发—beep
- [Python 学习] 两、在Linux使用平台Python
- Linux Futex的设计与实现