Just to clarify...
The whole idea of my script is that you can completely power off the system and have it wake up at a predefined time. This BIOS option is available on most modern motherboards and it can be directly programmed from Linux. You can actually set the exact time of system wakeup. Using the script, you can set the timer to the desired wakeup time and then immediately shutdown the system. It will power on, boot and start mining using cgminer. You can then program cgminer to mine for a specified amount of time and then execute the poweroff script again... Simple. If you need to wake your system at regular intervals you don't even need any script at all, actually...