With the rapid development of industrialization, the environmental pollution issue is becoming increasingly serious, especially the air pollution problem. As the core of the prevention and control of air pollution, air pollution prediction plays a very significant role in human survival and development. Therefore, it is highly essential to develop an accurate air pollution prediction model for mass rallies (e.g., playground and bazaar). Recent studies have suggested that multiple air contaminants, e.g., PM2.5 and PM10, which belong to a kind of aerosol, can carry the Covid-19 virus and spread it rapidly through the atmosphere, and this dramatically increases the risk of Covid-19 infection, particularly in the crowded and enclosed environment. Nevertheless, most existing air pollution prediction methods, which rely on large amounts of historical data for modeling and assume that the crowd flows relatively slow, are difficult to apply well to predict air pollution in mass rallies. To solve the aforementioned problem and better assist the decision-makers in managing environmental risk to human beings, in this article, we come up with a novel air pollution prediction model for mass rallies. More specifically, we first propose a temporally weighting matrix to differentiate the significance of training samples in the time domain. Then, we construct a temporal support vector regressor (TSVR), which puts more emphasis on the adjacent samples by considering the fact that the crowd usually flows promptly and disorderly in mass rallies. Finally, based on the extended TSVR, we develop a multitask TSVR (MTSVR) that simultaneously considers the related tasks. Since different air contaminants are correlated with each other, all the tasks can benefit by sharing information. The results of comparison experiments demonstrate that our presented MTSVR outperforms state-of-the-art single-task learners, multitask learners, and air pollution predictors when applied for air pollution prediction in mass rallies. Particularly, when under the six-task condition, the error values of the prediction of PM2.5, PM10, and O3 obtained by our proposed method are relatively lower, outperforming the most advanced method tested by 15.2%, 6.1%, and 4.3%, and the precision values of the predicted values outperform the advanced method tested by 28.3%, 25.1%, and 24.8%.