Most cooked meats including ham can be left at room temperature for up to 2 hours. If the area is warmer, the food may only be safe for up to 30 minutes. After that period, there is an increased chance of contracting a foodborne bacteria.
There are many ways a ham can be prepared. Country ham can be left out for up to a year at room temperature if it is uncut. Canned ham can be safe for up to 2 years. Fresh ham should be stored in the refrigerator for 3 to 4 days before it becomes inedible. Uncooked country ham can be refrigerated for 2 to 3 months after it is cut. Frozen ham will remain safe forever, but may lose some of its flavor or texture.