Job scheduling of high performance cluster has been generally achieved using the job scheduling system. The efficiency of job scheduling can be significantly increased by filling accurate job runtime. To increase the accuracy of prediction, it is necessary to use job category information that is acquired by clustering job logs. After the data are sorted out, Transformer with plain connection in accordance with attention mechanism is adopted to predict job runtime. For data processing, 6-dimensional features are selected from the historical log datasets, inaccordance with the correlation with job runtime, the integrity of the features and the validity of data. The datasets are divided into multiple job sets in accordance with the length of the job runtime, each job set will be trained and predicted respectively. As revealed by the results, the proposed method exhibits better prediction performance and achieves, an average accuracy of 0.892 on the HPC2N, with 15.2% MAPE. Furthermore, the proposed time embedding method shows obvious advantages in training time and prediction performance, suggesting that the proposed model can be employed in the actual scheduling environment.