Distributed and heterogeneous edge computing environments require efficient allocation and scheduling of multiple users’ applications. This paper presents a game-theoretic solution to model the competition between time-sensitive internet of things (IoT) applications with indivisible loads to be allocated and scheduled to edge servers. We model the allocation problem as a selfish routing game such that no job is unsatisfied with its allocation. Also, the allocated jobs are scheduled using a weighted time-sharing approach, which assigns resources to jobs proportional to their demands and deadlines. We proved the existence of pure Nash equilibrium in the introduced game and presented a greedy and polynomial time algorithm to obtain the solution called SAFSA. Using an extended version of the CloudSim simulator, we assess our approach in different situations by employing a real-world dataset of the Google cluster. Since the proposed algorithm considers jobs’ deadlines beside resource requests in allocation and scheduling decisions, it can simultaneously minimize average response time and maximize the number of jobs completed within their deadlines.The simulation results confirm the ability of SAFSA to efficiently execute the jobs within their deadlines, especially when there are many IoT devices and edge servers in the system, which is the main characteristic of IoT environments.