If you bake the ham properly so that it is cooked all the way through and to a high enough temperature to kill any and all germs, then theoretically you don't need to refrigerate it at all for a couple of days.
That said, it is much, much better to leave uncooked meat refrigerated until ready for baking or cooking.
Fish can be kept in the fridge for up to 2-3 days before it goes bad.
Breastmilk can be safely kept out of the fridge for up to 4 hours before it needs to be discarded.
A turkey should be kept in the fridge for 1-2 days before cooking to ensure it is properly thawed and safe to eat.
A fresh turkey can be kept in the fridge for up to 2 days before it spoils.
Boiled eggs can typically be kept in the fridge for up to one week before they spoil.
Eggs can be kept out of the fridge for up to two hours before they should be refrigerated to prevent spoilage.
Dough can typically be kept in the fridge for 1-3 days before it goes bad.
Eggs can be kept out of the fridge for up to two hours before they should be refrigerated to prevent spoilage.
Milk can be safely kept out of the fridge for about two hours before it starts to spoil. After that, it should be refrigerated to maintain its freshness and prevent bacterial growth.
Worms typically die within a few hours to a day if kept in the fridge.
Broccoli can typically be kept in the fridge for about 5-7 days before it starts to go bad.
Marinated chicken can be kept in the fridge for up to 2 days before it goes bad.