linux中crontab的使用方法


[root@fwq prac]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed

特殊符号的意义

* (星号) 表示任何时刻都可以接受

,(逗号)  表示分隔时段的意思

-(减号) 表示一段时间内

/n(斜线) 表示每隔n个单位,也可以写成-59/5

猜你喜欢

转载自blog.csdn.net/fwq11223344/article/details/41516189