Order acceptance and scheduling is an interesting scheduling problem when scheduling and acceptance decisions need to be handled simultaneously. The complexity of the problem causes difficulty for many solution methods. In this paper, we proposed a learning and optimizing system to deal with the order acceptance and scheduling problem with a single-machine and dependent setup times. The aim of this system is to combine the advantages of the hyper-heuristic for learning useful scheduling rules and the meta-heuristic for further refining the solutions from the obtained rules. The experiments show that the proposed system is very effective as compared to other heuristics proposed in the literature. The analyses also show the benefits of scheduling rules obtained by the hyper-heuristic, especially for large-scale problem instances.