您好,登錄后才能下訂單哦!
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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。