Other Help Topics :: How do I make DSL shut down at a certain time?
I edited my crontab and installed cron, I'll be back in a min to see of it works...
hmmmm. I'm lost. at about 8:40 by my clock on May 8, I set up crontab as follows:
45 20 * * * sudo shutdown -n -h -t secs now
Wouldn't this have turned the computer off at 8:45? The shutdown command doesn't work alone, so I made it skip init (very fast) halt linux, and do it instantly. Why did this now work?
For your reference, I downloaded this debian package for the cron server:
cron_3.0pl1-87_i386.deb
which I got from here
Did I get the wrong package or program crontab wrong?
the shutdown command requires arguments, at the very least whether you want to halt or reboot the system. For halt you need to specify when, such as "sudo shutdown -h now".
DSL has an alias for this: "sudo halt"
Normally you have to use the full path of the commands in cron jobs:
45 20 * * * /full/path/to/sudo /full/path/to/shutdown -n -h -t secs now
original here.