We develop a dynamic prioritization policy to optimally allocate a scarce resource among K projects, only one of which can be worked on at a time. When the projects' delay costs differ, the problem (a “restless bandit”) has not been solved in general. We consider the policy of working on the project with the highest delay loss as if the other project was completely finished first (although recourse is allowed). The policy is optimal if: (1) the delay cost increases with the delay regardless of the performance state, (2) costs are not discounted (or, discounting is dominated by delay costs), (3) projects are not abandoned based on their performance state during processing at the scarce resource, and (4) there are no stochastic delays. These assumptions are often fulfilled for processing at specialized resources, such as tests or one-off analyses.