- 论坛徽章:
- 0
|
回复 2# chenyx
好像木有吧
# ll /etc/|grep cro
-rw-r--r--. 1 root root 541 Jul 19 2011 anacrontab
drwxr-xr-x. 2 root root 4096 Mar 15 13:29 cron.d
drwxr-xr-x. 2 root root 4096 Sep 27 2011 cron.daily
-rw-r--r--. 1 root root 0 Jul 19 2011 cron.deny
drwxr-xr-x. 2 root root 4096 Sep 27 2011 cron.hourly
drwxr-xr-x. 2 root root 4096 Sep 27 2011 cron.monthly
-rw-r--r--. 1 root root 457 Sep 27 2011 crontab
drwxr-xr-x. 2 root root 4096 Sep 27 2011 cron.weekly
[root@localhost ~]# ll /etc/cron.daily/
total 4
-rwxr-xr-x. 1 root root 196 Aug 16 2012 logrotate
[root@localhost ~]# cat /etc/cron.daily/logrotate
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf >/dev/null 2>&1
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0
[root@localhost ~]# 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@localhost ~]#
|
|