A coding problem, over a slotted system, is introduced where the sender has to transmit one out of several packets to the receiver, but learns the request only at the beginning of each slot with prior statistical information about which packet is needed at the receiver. There is an associated cost of sending bits at each slot, and the goal is to minimize the expected cost of the communication. A proactive coding scheme is proposed, where the source proactively communicates with the receiver before the receiver requests the message. This way, by designing a cost optimal side information at the receiver, the scheme is able to minimize the expected cost of the communication. Numerical results are provided demonstrating the gains obtained by proactive coding over the conventional coding technique.