So you've got an ubuntu box you want on during business hours, but you don't need it on outside business hours. Maybe it's a build server or something similar. Obviously, you could manually start it every morning - but you might be ill or go on holiday. Let's automate it with wake-on-RTC! The instructions below are for Ubuntu 14.04.
First of all, create this file at /root/weekday-restart.sh (I use sudo pico /root/weekday-restart.sh
but you can use any text editor you like!)
Then make it executable and edit root's crontab:
And add the following lines:
Scheduling the restart will log the results (and any errors) to /root/last-restart.log so if you have any trouble you can debug it easily.
The pm-suspend line suspends the box at 20:00 but the wake-on-rtc will work just as well if you power off the box entirely. This can also give you a convenient chance to apply any updates - but if you're going to run apt-get, make sure your script sets the path so it works right under cron.