Abstract. This paper presents a Resource-Constrained Project Scheduling Problem (RCPSP) settled by contractual milestones. The criterion analysed here is the maximisation of aggregate discounted cash flows from the contractor's perspective, known as an RCPSP problem with Discounted Cash Flows (RCPSPDCF). The cash flows analysed here cover the contractor's cash outflows (negative cash flows), related to the commencement of individual activities, and cash inflows (positive cash flows) after the fulfilment of individual milestones. The authors propose a two-phase algorithm for solving the problem defined. In the first phase, the simulated annealing metaheuristics is used, designed to identify a forward schedule with as high total DCF as possible. In the second phase, the best first-phase schedule is improved by right shifts of activities. To this end, the procedure which iteratively shifts tasks by one unit is applied, with a view to maximising the objective function. Activity shifts take into consideration precedence and resource constraints, and they are performed for a specified resource allocation to activities. This paper also includes an analysis of the problem for a sample project. The results of computational experiments are then analysed. The experiments were run with the use of standard test problems from the Project Scheduling Problem LIBrary (PSPLIB), with additionally defined cash flows and contractual milestones.