A task scheduling method based on dynamic time window is proposed that is aimed at resolving the task scheduling problem of phased array radars. Based on constraints between the residuals of target tracking filtering and radar target tracking gate and search frame cycle, the method calculates the time window of tracking task and the time window of the search task, respectively. Finally, we undertake a simulation of our method by comparing with the traditional time window design method. The simulation results prove the effectiveness and superiority of our method.