In this paper, we give the necessary and sufficient conditions for the boundedness of Hardy– Cesàro operators on some weighted function spaces such as the weighted central Morrey, weighted local central Morrey, weighted non-local central Morrey, weighted Herz and weighted Morrey–Herz type spaces with variable exponent.