Purwokerto's lowland climate is hot and humid year-round, but the highlands at Baturraden are noticeably cooler at any time of year and offer a reliable escape from the heat. The dry season (May to September) is the best time to visit: Baturraden is at its most walkable, the hiking routes on Mount Slamet are accessible, and the risk of flash floods on the forest trails is lower. June and July also coincide with Indonesian school holidays, which means Baturraden gets busy on weekends — if you want the hot springs to yourself, come on a weekday morning.
The wet season (November to March) brings daily rain and can make the forest paths slippery and unpleasant. Travelling to and from Purwokerto by train is unaffected, and the city itself remains perfectly functional; it is the outdoor attractions that suffer. Avoid early January and the period around Idul Fitri if you want to travel freely — trains out of Purwokerto sell out weeks in advance during the Lebaran exodus.