Generally speaking, a corn snake will need an area (up to half of the viv or tub) that reaches a temp of around 86F/30C for at least 12 hours a day, with the rest of the viv being in the 70'sF. As long as night time temps stay in the 70's it'll be ok, but you could leave the red bulb on 24/7 as long as it's not too bright.
What type of set up have you got?
A baby (hatchling) corn only needs a small plastic tub really - about 15"x10"x5" would be ideal for yours - a plastic lunchbox with ventilation holes drilled is ideal. But you would need a heat mat and matstat for this type of set up.
keep the bulb onto a thermostat and leave it on all the time and let the thermostat turn it on or off. the temp should be 31C or there abouts... red lights can stay on for the whole time as snakes don't register red lights.
we have a heat mat under half the viv, and a pigmi red bulb in use we have been told today only put hte heat mat on at night. the temp at the mo is between 77 - 81.we have put a hide in and quite a bit of hay like stuff thats specailly for snakes.we have also put a log in and quite a big water bowl.we also have a guard over the buld to stop tango burning him/herself ?.luv cathx
weve only had the light on an hour or 2 at the most so far the temp does seem to be rising slowley, the reason we have only had it on for a short space of thime is we were trying to get hold of a guard the it didnt burn.luv cathx ps what does imo mean haveing a senior momen he he.x
For corns i would aim to get a temp at the hot end of around 84-86.I used to achieve this by having a heat mat on stat and then a pygmy bulb used during the day.The pygmy bulb should not heat the viv too much but if it is a warm day then the heat mat will not operate as the stat wont allow it to but if it does get cooler then the heat mat kicks in a raises the temp without any worries.Just turn the light of at night and the viv should get enough of a drop in temp to sort out your night time lows