In this paper, we study a scheduling problem in horse race organisation. Horse races must be planned using a predefined racing calendar over a given time period to maximise the total number of runners, while satisfying hard constraints based on racing codes and soft constraints for the modelling of potential race sequences. Two metaheuristics guided by a penalty function and using specialised neighbourhoods are implemented and applied to real and artificial instances. The numerical experiments show the effectiveness of the methods compared to a more naïve neighbourhood, a heuristic, and manual planning by human experts. We then propose a compact 0-1 linear programming formulation that simplifies the initial problem and provide a proof of its NP-hardness to highlight the difficulty of the problem we have solved.