Chinaunix首页 | 论坛 | 博客
  • 博客访问: 40330
  • 博文数量: 32
  • 博客积分: 1326
  • 博客等级: 中尉
  • 技术积分: 330
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-25 18:13
文章分类

全部博文(32)

文章存档

2010年(32)

我的朋友
最近访客

分类: LINUX

2010-07-01 23:49:37

ant@ant:~$ crontab --help
crontab: invalid option -- '-'
crontab: usage error: unrecognized option
usage:    crontab [-u user] file
    crontab [-u user] { -e | -l | -r }
        (default operation is replace, per 1003.2)
    -e    (edit user's crontab)
    -l    (list user'
s crontab)
    -r    (delete user's crontab)
    -i    (prompt before deleting user'
s crontab)
ant@ant:~$



ant@ant:~$ cat /etc/crontab



* 星号表示任何时候
, 逗号表示不连续的时间段
- 中横杠表示连续的时间段
/n 表示每隔n个单位间隔



01 * * * * ping -c 3 google.com
每小时的01分执行一次ping命令

每小时的01和03分执行一次ping命令
01,03 * * * * ping -c 3 google.com

1点到8点每小时的10分执行一次ping命令
10 01-08 * * * * ping -c 3 google.com

每隔7分钟执行一次ping命令
/7 * * * * * ping -c 3 google.com


阅读(282) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~