just buy a heavy duty timer like a t101 and if you do not want to hard wire it you do not have to, you can just as easily add short 1- 2 ft cords with male and female plugins by cutting the ends off a heavy duty extension cord.
it should come with a wiring diagram or you can get it from there website below.
Intermatic Energy Controls - Mechanical Time Switches - 24 Hour
standard wire colors in most extension cords for usa will be green = ground,white = nuetral, black = hot.
the contacts in most all the timers that plug directly into the wall are not heavy enough to last while they will work for awhile they will have a short life span, have seen plenty of them melt and can definatly see a possible fire hazard they are also notorious for the contacts to stick closed and the light never turns off wich is always nice when your halfway through flowering.