With the development of the smart Internet of Things (IoT), an increasing number of tasks are deployed on the edge of the network. Considering the substantially limited processing capability of IoT devices, task scheduling as an effective solution offers low latency and flexible computation to improve the system performance and increase the quality of services. However, limited computing resources make it challenging to assign the right tasks to the right devices at the edge of the network. To this end, we propose a polynomial-time solution, which consists of three steps, i.e., identifying available devices, estimating device quantity, and searching for feasible schedules. In order to shrink the number of potential schedules, we present a pairwise-allocated strategy (PA). Based on these, a capability average matrix (CAM)-based index is designed to further boost efficiency. In addition, we evaluate the schedules by the technique for order preference by similarity to an ideal solution (TOPSIS). Extensive experimental evaluation using both real and synthetic datasets demonstrates the efficiency and effectiveness of our proposed approach.