Forage availability has been suggested as one driver of the observed decline in honey bees. However, little is known about the effects of its spatiotemporal variation on colony success. We present a modeling framework for assessing honey bee colony viability in cropping systems. Based on two real farmland structures, we developed a landscape generator to design cropping systems varying in crop species identity, diversity, and relative abundance. The landscape scenarios generated were evaluated using the existing honey bee colony model BEEHAVE, which links foraging to in-hive dynamics. We thereby explored how different cropping systems determine spatiotemporal forage availability and, in turn, honey bee colony viability (e.g., time to extinction, TTE) and resilience (indicated by, e.g., brood mortality). To assess overall colony viability, we developed metrics, PH and PP, which quantified how much nectar and pollen provided by a cropping system per year was converted into a colony's adult worker population. Both crop species identity and diversity determined the temporal continuity in nectar and pollen supply and thus colony viability. Overall farmland structure and relative crop abundance were less important, but details mattered. For monocultures and for four-crop species systems composed of cereals, oilseed rape, maize, and sunflower, PH and PP were below the viability threshold. Such cropping systems showed frequent, badly timed, and prolonged forage gaps leading to detrimental cascading effects on life stages and in-hive work force, which critically reduced colony resilience. Four-crop systems composed of rye-grass-dandelion pasture, trefoil-grass pasture, sunflower, and phacelia ensured continuous nectar and pollen supply resulting in TTE > 5yr, and PH (269.5kg) and PP (108kg) being above viability thresholds for 5 yr. Overall, trefoil-grass pasture, oilseed rape, buckwheat, and phacelia improved the temporal continuity in forage supply and colony's viability. Our results are hypothetical as they are obtained from simplified landscape settings, but they nevertheless match empirical observations, in particular the viability threshold. Our framework can be used to assess the effects of cropping systems on honey bee viability and to develop land-use strategies that help maintain pollination services by avoiding prolonged and badly timed forage gaps.