##有说是用这命令启动的,
sudo /sbin/service crond start
[sudo] password for aaa:
sudo: /sbin/service: command not found
可显示是未知的服务 闷闷
sudo gedit /etc/crontab 按 分 时 天 月 周 命令 的格式 加上了 shutdown -h now 或halt
可是 为什么不执行呢 也加过sudo 也不行的
下面是我的 /etc/crontab 中的内容
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
16 22 * * * root shutdown -h now
WIKI也看了 简直是一塌糊涂 这个问题已搜了两天了,LINUX实现个定时任务有这么难吗??

感谢楼的 sudo shutdown -h ** 这样当然可以 这样失去了定时任务的特性,再者sudo 在脚本中不要密码吗 不会的,只是想实现个 定时开机放歌闹钟,再定时关机,在家闹醒,出外防贼,学脚本、学VI编辑 真是受不了啊,五天过去了,还是这样痛苦啊

ubuntu启动重启服务是 sudo start cron 或 sudo restart cron 感觉很重要
如下修改都行了,linux真是时好时难呵,奇了怪了,
sudo gedit /etc/crontab
45 22 * * * root poweroff
47 22 * * * root halt
48 22 * * * root shutdown -h now
49 22 * * * root /sbin/halt

开机放音乐吗 多首连放 如下:
A。用音乐软件(Rhythmbox等)保存 好你喜欢的歌曲列表(文件名还是用英文的好,有的地方不认中文的。我此处文件名start.pls)
B。写一脚本备用:(我的文件名是:start2)我用Totem播放的 内容下:
#!/bin/bash
/usr/bin/totem /home/abc/start.pls
C。sudo gedit /etc/crontab中加上
15 7 * * * root /home/abc/start2