We present an algorithm for planning with time and resources based on heuristic search. The algorithm minimizes makespan using an admissible heuristic derived automatically from the problem instance. Estimators for resource consumption are derived in the same way. The goals are twofold: to show the flexibility of the heuristic search approach to planning and to develop a planner that combines expressivity and performance. Two main issues are the definition of regression in a temporal setting and the definition of the heuristic estimating completion time. A number of experiments are presented for assessing the performance of the resulting planner.