to flog (beat) a dead horse

“to flog/beat a dead horse”
to continue to make an issue of something that is over; to waste effort on something that there is no chance of succeeding at
آب در هاون کوبیدن، اصرار در انجام کاری که شانس موفقیت ندارد

Example 1: He keeps trying to get it published but I think he’s flogging a dead horse.
Example 2: The history teacher lectured us every day about the importance of studying history, until we begged him to stop flogging a dead horse.