For low-productivity gas wells, insufficient formation pressure leads to issues like liquid loading and decreased gas production rates. Intermittent production, where wells are periodically shut-in and open, is a common approach to address these problems. This strategy allows formation pressure recovery during the shut-in period, which leads to a higher gas rate during the production period to carry liquids out of the wellbore. However, unreasonable operating schedules can result in problems such as insufficient formation pressure recovery and issues of liquid loading. Therefore, an optimization method for intermittent gas wells based on particle swarm optimization (PSO) algorithm and deep-learning model is proposed. The PSO algorithm determines the optimal schedule, while the deep-learning model forecasts key cycle parameters for these potential schedules. A total of 110,000 key cycle parameters dataset extracted from high-frequency raw data of 304 wells is used in the model training process. The test results show that the trained model accurately predicted all selected key cycle parameters, with R2 values ranging from 0.91 to 0.99. Finally, the optimization method was applied to 100 wells in the gas field for real-time validation. Field application results show a success rate exceeding 95%, demonstrating the effectiveness of the proposed method for real-time production optimization of low-productivity gas wells under intermittent production.