您好,登录后才能下订单哦!
1、centos 代理服务器上crontab的设置
crontab -e
00 01 * * * /usr/sbin/ntpdate 192.168.1.1 >> /root/ntpdate.log 2>&1
00 23 * * * /root/sarg.daily > /dev/null 2>&1
00 12 * * 3 /sbin/shutdown -r now > /dev/null 2>&1
*/10 * * * * /root/squid_status.sh > /dev/null 2>&1
10 21 * * 2 /bin/cat /dev/null > /var/spool/mail/root > /dev/null 2>&1
15 21 * * 2 /bin/cat /dev/null > /var/log/messages > /dev/null 2>&1
20 21 * * 2 /bin/cat /dev/null > /var/log/maillog > /dev/null 2>&1
00 19 * * 5 /bin/rm -f /var/log/maillog* && touch /var/log/maillog > /dev/null 2>&1
10 19 * * 5 /bin/rm -f /var/log/messages* && touch /var/log/messages > /dev/null 2>&1
2、nagios上crontab的设置
00 22 * * * /bin/cat /dev/null > /var/spool/mail/root > /dev/null 2>&1
00 23 * * * /bin/cat /dev/null > /var/spool/mail/nagios > /dev/null 2>&1
00 21 * * 2 /bin/cat /dev/null > /var/log/messages > /dev/null 2>&1
10 21 * * * /bin/cat /dev/null > /var/log/maillog > /dev/null 2>&1
00 19 * * 5 /bin/rm -f /var/log/maillog* && touch /var/log/maillog > /dev/null 2>&1
10 19 * * 5 /bin/rm -f /var/log/messages* && touch /var/log/messages > /dev/null 2>&1
0 1 * * * /usr/sbin/ntpdate 192.168.1.1 >> /root/ntpdate.log 2>&1
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。