The permutation flowshop scheduling problem is a vital production management concern of industries such as electronic product manufacturing and integrated circuit fabrication. In many studies, jobs are prioritized independently according to their features or properties. This article develops a new perspective by introducing the self-attention mechanism into scheduling for the first time. The job similarities are characterized by the dot-product of processing time matrices and taken as job priorities. Based on this idea, a new priority rule denoted by PRSAT is proposed, and a heuristic named NEHLJP2 is presented with makespan minimization. The computational results with the Taillard and VRF benchmarks and 640 random instances demonstrate that the new priority rule and heuristic dominate the existing ones at a nominal cost of computation time.