Palm Springs’ irreverent hero, Nyles (Andy Samberg) is a guy who just wants to relax, crack a beer and crack jokes. We first meet him at his friend’s wedding ceremony, lounging in a red Hawaiian shirt and yellow shorts. Like so many Samberg characters, Nyles is both a goofball and smarter than he looks, the kind of leading man to announce “I didn’t see that coming!” when really he’s two steps ahead of everyone else. At the ceremony, he predicts every dance move and hookup before it happens, which means he’s either really, really perceptive, or he’s lived this day before. We soon find out it’s the latter.

Written by Andy Siara and directed by Max Barbakow, Palm Springs is a satisfying, if standard story about someone reliving the same 24 hours over-and-over. Nyles is trapped in a wormhole that continually sends him back to the same Saturday. He entertains himself with his preeminence, which he uses to seduce his fellow wedding guests. That is before the maid of honor and sister of the bride, Sarah (Cristin Milioti), follows him into a mysteriously glowing cave. Sarah, naturally, wakes up on her sister’s wedding day (again) with questions. “It’s one of those time loop things you might have heard about,” Nyles explains.

On a scale of other films about time loops, Palm Springs lands somewhere between Groundhog Day (the classic starring Bill Murray and Andie MacDowell) and Source Code (with Jake Gyllenhaal and Michelle Monoghan).

Sandberg and Milioti have a mercurial chemistry, flashing from playful banter to cold, cutting arguments in an instant. Their relationship allows the time loop narrative to go places it hasn’t gone before, exploring the differing perspectives of two people trapped in the same nightmare. It’s an effective concept, pinning Samberg’s chill composure against Milioti’s jittery determination. While Nyles treats it like a vacation, content to down brews on a pool floaty, Sarah does all she can to break the loop: she tries drugs, dying and even drives to Texas, a feat that would be impressive had Nyles not previously made it to Africa on a crystal meth binge. She tries everything to escape, but fails.

In the film’s second act, Barbakow breezes past the “Chekhov’s long winter” portion of the Groundhog Day formula, maintaining an airy, laid-back vibe throughout. The film is at its best during the big moments; when Sarah stands on a moving car, when Nyles pulls a bomb out of the wedding cake (“don’t worry, I used to be a bomb guy”) and when the pair find themselves performing an elaborate dance routine in matching denim jackets to “Megatron Man.” The music in Palm Springs feel like a highlight — and after the other needle drops about time passing too quickly, we get perfect selections such as “Time After Time” and “Oh! You Pretty Things.”

There’s also a supporting cast packed with lively characters including Camila Mendes as the bride, Peter Gallagher as the father of the bride and J.K. Simmons as the last guy you want showing up at your wedding. Simmons does get a touching monologue about living in the moment — think Michael Stuhlbarg’s speech in Call Me By Your Name or John Hamilton’s in Eighth Grade but with poop jokes. Nyles applies that advice to his own life, where he makes the most of every second, minute and day with Sarah.

Palm Springs fills its 90 minutes with sweet silliness, mostly in scenes highlighting Nyles and Sarah’s budding romance. These charming leads are as refreshing as a dip in the pool on a hot summer day, even if the premise isn’t new. The time-loop movie has never really been about finding a way out, but finding a way to change for the better, providing its characters valuable lessons about life and themselves. In the end, we don’t care if Nyles and Sarah make it out, as long as they make it together.

Available on Hulu. Also at the Mission Tiki Drive-In, 10798 Ramona Ave, Montclair.  (909) 628-0511. missiontiki.com/