使用which crontab找到crontab
[root@lmrac1 ~]# which crontab
/usr/bin/crontab
本来想cat看看里面的东西,结果出来了一堆的乱码。我不服,应该有个介绍文档吧
[root@lmrac1 ~]# find / -name crontab
/usr/bin/crontab
/etc/crontab
果然不出我所料。
[root@lmrac1 ~]# 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
[root@lmrac1 ~]#
简单一句话:分时天月周命令
crontab常用命令:
查看:crontab -l
编辑:crontab -e