Almost five years ago I have developed a mini automation project for automating turning things on and off at certain times. This project can be found here: http://www.etedal.net/2014/01/mini-automation-project.html
I have done a very similar project using BeagleBone and Python which the related code can be found here:
https://github.com/mahyaret/MiniAutomation