If you're dealing with house current, and a range of "X" measured in hours, there are plug-in timers designed to turn lamps on and off. They're used to make it look like you're home, when you're not. Very inexpensive.
.
Noma electric sells one.6 of on available
u can use 555 ic and giv its output to bc549(a bjt) which will act as a switch
use the 555 in astable mode
chk out this link
http://physics.usask.ca/~angie/ep326/lab...
where,
T on=3.96(R1+R2)C
T off=3.96(R2)c
set ur turn on and turn off time by varying values of Ra,Rb,C
I need a switch that turn it's self on for an X amount of time then wait for an X amount of time then turn on then repeat. It's for a small electrical project so try to keep it at a reasonable price.