CWYAlpha

Just another WordPress.com site

Thought this was cool: Linux定时自动重启服务

leave a comment »


vim /opt/reboot.txt

输入以下内容:

0 1 * * * /var/www/bin/apachectl restart

0 12 * * * /var/www/bin/apachectl restart

0 18 * * * /var/www/bin/apachectl restart

把reboot.txt加入到cron服务中

crontab /opt/reboot.txt

列出现有的时程表,检查一下有没有问题

crontab -l

重启cron服务

/sbin/service crond restart

相关日志:


0

   

0

udpwork.com 聚合
|
评论: 0
|
要! 要! 即刻! Now!

from IT牛人博客聚合网站: http://www.udpwork.com/item/9552.html

Written by cwyalpha

四月 11, 2013 在 11:08 上午

发表在 Uncategorized

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: