Way out there in terms of timeline, but let's get the obvious one out of the way.
Edge of Tomorrow a Tom Cruise movie from 2014 about defeating an alien invasion by having our hero loop through the same day over and over.
The film takes place in a future where most of Europe is occupied by an alien race. Major William Cage (Cruise), a public relations officer with limited combat experience, is forced by his superiors to join a landing operation against the aliens, only to find himself experiencing a time loop as he tries to find a way to defeat the invaders.
The hero revives each time he dies.
His attempts to warn Farell against the invasion are ignored and he experiences the loop of dying on the beach and waking at Heathrow repeatedly.