- 论坛徽章:
- 0
|
/etc/crontab的内容为:
[root@benjms etc]# cat 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
# | | | | |
# * * * * * command to be executed
其内容主要是指明cron运行的环境,在生产环境中,主要是修改PATH变量,例如,需定时运行一执行文件abc,而abc不在PATH中,那么可以修改/etc/crontab的PATH,加入abc所在的目录,也可以在crontab -e中指定绝对路径 |
|