Summary: To describe the characteristics of a numerical control (NC) system, which is a hybrid tasks system consisting of a variety of tasks that are not independent of the existence of precedence order and resource hazard, a new Hybrid Tasks System (HTS) model is presented. As the traditional real-time scheduling algorithms are no longer suitable for the characteristics of an NC system, a heuristic Best-First Search (BFS) algorithm is introduced to schedule HTS model tasks. The BFS algorithm searches state node matching constraint conditions and minimizes (maximizes) the value of heuristic evaluation function in the state-space tree, so that it can work out the problem with an optimal solution. Case study and computational complexity analysis proved that the BFS algorithm can schedule tasks in an NC system effectively.