Check the timetables and fares of the Montserrat rack railway, the Sant Joan funicular and the Santa Cova funicular in this link.
The frequency of the trains and the prices of the rack railway and funiculars may vary according to the time of year.