+ -
当前位置:首页 → 问答吧 → 如何才能自动关机呀,运行crontab -e命令没有找到

如何才能自动关机呀,运行crontab -e命令没有找到

时间:2008-03-31

来源:互联网

如题,想在每天下午五点关机,
crontab -e
然后输入
0 17 * * * poweroff
可是输入crontab -e后提示command no found

作者: reglinux   发布时间: 2008-03-31

你没有安装cron?

作者: blackwhite   发布时间: 2008-03-31

安装vixie-cron

作者: Eadwen   发布时间: 2008-03-31

emerge cron

运行crontab -e
然后输入
0 17 * * * poweroff
可是到了17点还是不关机,有的说要检查自动执行定时任务的服务有没有开启,如没有,要开启
怎么开启?

作者: reglinux   发布时间: 2008-04-01

有没有把服务添加进runlevel?
rc-update add xxx default
另外,poweroff需要root权限。crontab -e需要在root帐号下运行的

作者: kpld   发布时间: 2008-04-01

首次安装后是不是要/etc/init.d/XXX start?

作者: BzFly   发布时间: 2008-04-01

rc-update add vixie-cron default吧

作者: reglinux   发布时间: 2008-04-02

代码:
shutdown -h $minutes
代码:
man shutdown|halt|poweroff|...

作者: flyinflash   发布时间: 2008-04-02

哦,没细看

echo "shutdown -h $minutes" >> ~/.bashrc

作者: flyinflash   发布时间: 2008-04-02

poweroff ==> halt (or shutdown -h 0)

作者: psdx   发布时间: 2008-04-02

热门下载

更多