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.