The goal of this paper is to study fractional differential equations involving instantaneous and non-instantaneous impulses with Sturm-Liouville boundary conditions. By using critical point theory and variational approach, infinitely many solutions are obtained. The interesting point is that the potential has an oscillating asymptotic behavior. Also one example is presented to illustrate the main result.