I designed an alarm clock with random ON/OFF times to make a house look like it was occupied. Attached is the schematic and picture of the PCB. I sell these as a kit, but I see no reason why I cannot email you the code if you buy the kit, so you can modify it to suit your needs. It is based on a PIC and written in C. Please let me know