Hard-boiled eggs should be kept in the refrigerator and eaten within 5 days.
Any longer than this and the salmonella risk starts to rise very quickly.
One the subject of eggs, here is the definitive guide to...
Boiling an Egg
Fill a saucepan with enough cold water to cover your egg. If the egg floats then it is too old and should be thrown away. Remove the egg, and turn on the heat, bringing the water to a strong rolling boil. If you put the lid on the pan it will boil more quickly, saving you time and money.
Take the lid off and reduce the heat to a simmer.Place your eggs in the water and let them simmer for... Well it depends on the size of the egg and how hard or runny you like them
4 minutes is usually the minimum for a small soft boiled egg and a large hard boiled egg can take about 12 minutes. Somewehre in between is your perfect egg.
If you want a hard boiled eggbut intend to eat it later on in the day, you should cool it rapidly under a tap. If a hard boiled egg cools slowly it sometimes gets a totally harmless but unappealing green colour around the yolk.