Just buy one of these (or similar):
Netgear GS308 Ethernet Switch
Then put the ethernet csble 'through' it, any 2 ports will work.
When unpowered there wont be a connection between the two cables, when powered there will.
Put the AC power for the GS308 through your favourite timer switch...