Task scheduling is a key issue in the edge computing environment, and the goal is to provide optimal task allocation among resources. Reasonable decision-making for task scheduling on edge devices with limited resources can greatly improve offloading efficiency and reduce application processing latency. Aiming at the task offloading decision-making problem in the edge computing environment, a network model and a task scheduling model are established, the task scheduling method is defined to reduce the task delay, and an optimization algorithm is proposed to solve the task completion in the edge task scheduling under the delay-sensitive task constraints time optimal solution. The algorithm adopts the Genetic Algorithm (AG), which encodes the tasks generated by edge devices in binary mode, optimizes the selection function, and shortens the task delay. The experimental results show that the algorithm proposed in this paper can effectively reduce the task execution time and delay compared with other strategies.