Lnmp定时重启服务的设置
这两天有台vps不知道是抽风还是怎么了,每天早上过来都需要重启下lnmp才能正常访问网站。暂时找不到原因,那只能想办法定时重启lnmp了# vi /etc/crontab
在最后一行加上
0 */8 * * * /root/lnmp restart //每隔8小时重启一次
或者 00 1 * * * /root/lnmp restart //每天凌晨1点重启
然后重启crond服务:
CentOS:/etc/rc.d/init.d/crond restart
Debian:/etc/init.d/cron restart
页:
[1]