Ok I tried editing /var/spool/cron/crontabs/root and /var/spool/cron/crontabs/steve with nano, and created the following entry:
30 18 * * 1-7 /sbin/shutdown -h
saved it ok, checked the cron and its in the list.
I enabled the cron service, and nothing runs.
You need to instruct the shutdown command when it should shutdown:30 18 * * 1-7 /sbin/shutdown -h now
Actually, you might want to provide a bit of warning, rather than shutting down without notice.
Thats not the point...
I tried BOTH, and neither work...
Ive done it!
One bloody character!!
it SHOULD read:
30 17,18,19 * * * /sbin/shutdown -h now
30 18 * * 1-7 /sbin/shutdown -h now
It was the 1-7 that confused it,
every day should be * not 1-7.
hurray! took me a few weeks to crack it eh?
After all that effort... guess what? the day after I figured out the cron problem,
A machine was getting thrown in the trash at work... a perfectly functional AMD Athlon XP 2000, I said if its being dumped, Ill have it,
my three year old now has a 1.7mhz cpu running Ubuntu Hardy, Ive never needed to use the cron in Vector!
(anyone want a Celeron 400?)
I cant believe we are throwing away a 1.7mhz pc as being too slow!!!
that is of course because it was running XP.
flys on Linux, but hey, we all know that!