I found that detail too (the typo) - and fixed it. I've also learnt how to use vi-editor, but man - can this not be modernised? It is sooo 1980s!
I've now typed # crontab -e
Code:
0 18 * * * /sbin/shutdown -h now
That is supposedly the way it works. It did shut down at 18:00, but I didn't try to boot it up again till this morning - and it booted fine. I am thinking that it may have to do with the type (thank you jpollard for pointing that out).
scott: If I stick things in /var/spool/cron/USER_ID - does it still shut down? Or is it user dependent? One needs to be root to shut down even though others are logged in...
Then another thing - I'm trying to get Zenity to post a message warning of shutdown 20 minutes, and 10 minutes before shutdown. So I've created a file called /home/sd.sh and gave it chmod 755. The content of this file looks like this:
Code:
#!/bin/bash
zenity --warning \
--text="This computer will shutdown soon! Save your work."
This file works fine if I type: $ ./home/sd.sh
Then I added this through crontab -e
Code:
40,50 17 * * * /home/sd.sh
But I suspect something is wrong with that line, because it doesn't get executed... Any hints are welcome.
__________________
Greetz (and thanks for all the help!)
BenTrein
The internet isn't a highway, it's a swamp. The more you surf the more it draws you in!
Great authors suffer from Writer's Block. I cherrish my
Writer's Blog!