you need to find an outlet timer. thats what its called. but if your following loc-nar's recomendation of 15 on 45 off then it needs to be a timer you can make alot of settings(programs)on. for instance if your running 18/6 lighting, the you need to be able to make 36 programs on it to achive that.
lights on
hour 1 15 on 45 off = 2 programs
hour 2 again 15 on 45 off = 2 more programs get it?
if your running 24/0 lighting then the timer needs to be at least 48 programs
Now an outlet timer at home depot or lowes or wallmart will be anywhere from under $10 but probably wont have enough programability for you.
look to spend closer to $20 if you can find one with the amount of programs you will need.

I believe i mentioned earlier but that could have been someone elses thread but I found that a cycle timer is alot easier to set. since your repeating the same cycle over again 15 on 45 off for either 18 or 24 hours.
if your running lights for 18 hours I would get a cycle time that will operate when the light is on, it has a little photocell in it and when switched to daylight only it will operate only when your light is on.
if your running 24/0 lighting then for now till ya start to flower ya dont need the daylight only function.
anyway this cost a lot more than an outlet timer anywhere from $75 to $120