请教 Ubuntu 高手

来源: just4fun2007 2015-07-20 14:36:36 [] [旧帖] [给我悄悄话] 本文已被阅读: 次 (187 bytes)
自己用Ubuntu 14.04 弄了服务器跑 HTTP Proxy。 想让机器四小时或更长时间后自动 suspend. 可是选项最高只有2小时。请高手给指点一下, 谢了。 

所有跟帖: 

用cronjob stop apache2 service -GuoLuke2- 给 GuoLuke2 发送悄悄话 GuoLuke2 的博客首页 (0 bytes) () 07/20/2015 postreply 15:30:15

每次开机后都会在4小时后 suspend 吗? -just4fun2007- 给 just4fun2007 发送悄悄话 (0 bytes) () 07/20/2015 postreply 16:18:03

sleep 4h; sudo service apache2 stop -加州老李- 给 加州老李 发送悄悄话 加州老李 的博客首页 (0 bytes) () 07/21/2015 postreply 11:19:46

或: sleep 4h; sudo pm-suspend。没试验过,估计可以。 -加州老李- 给 加州老李 发送悄悄话 加州老李 的博客首页 (0 bytes) () 07/21/2015 postreply 11:37:25

谢谢两位!我会试试 -just4fun2007- 给 just4fun2007 发送悄悄话 (0 bytes) () 07/21/2015 postreply 11:39:35

上面是直接在SHELL里输入命令,不是用“crontab”。 -加州老李- 给 加州老李 发送悄悄话 加州老李 的博客首页 (0 bytes) () 07/21/2015 postreply 11:45:49

加跟帖:

  • 标题:
  • 内容(可选项): [所见即所得|预览模式] [HTML源代码] [如何上传图片] [怎样发视频] [如何贴音乐]