Typically, IT projects are delivered over-budget and behind schedule. In this paper, we explore the effects of common project management practices that contribute to these problems and suggest a better alternative that can utilize resources more effectively. Our alternative approach uses (a) a thorough analysis of risks affecting activities in a project plan (i.e., the root factors leading to cost and time overruns), and (b) an optimization of the resources allocated to each activity in the project plan to maximize the probability of on time and within budget project completion. One key feature of our method is its capability to adapt and learn the risk factors affecting activities during the course of the project, enabling project managers to reallocate resources dynamically to ensure a better outcome given the updated risk profile. We use simulations to test the performance of our optimization algorithm and to gain insights into the benefits of adaptive re-planning.