I want to recommend "Mother of Learning" by Domagoj Kurmaic
The book appears to be published by amazon but it started as a web-novel, you can read the whole thing for free here,
https://www.royalroad.com/fiction/21220/mother-of-learning
Above link is the complete story and a Damn Good One.
The plot takes place in a fantasy world where magic was the main source of power for years, but recently technological advancements have progressed to the point of being viable alternatives. We follow the story of a boy named Zorian who is attending 3rd year of magical academy at Cyoria. The first chapter opens up with him returning to the academy to start his 3rd year. Within a month, an invasion occurs and the next thing Zorian knows is that everyone is running for their lives (himself included). During the scuffle, he encounters another classmate, Zach who is fighting back against the enemy. It soon becomes obvious to the reader that Zach is a time-traveller. Near the end of the invasion, Zorian gets caught up in a spell intended for Zach and the next thing he knows is that the month is repeating. Groundhog-day style.
The story is divided into 3 arcs, but the published book splits the last arc into two, so ... the print edition has 4 books.
The first arc is about Zorian exploring his new situation of being in a time-loop. He starts out *very* lost, afraid and cautious. Near the end of the first arc, due to plot reasons, he makes a concentrated effort to stop the invasion - with consequences.
The second arc is about him exploring the circumstances of the invasion - why was it launched? What does the enemy hope to accomplish? And are there more people stuck in the time-loop?
The third and last arc is about making final preparations to leave the time-loop with a wonderful finale and awesome conclusion!
More than the conclusion (which *is* very satisfying!), what makes me recommend the story is the journey. This is an amazing piece of writing! Once you get over the first few chapters - the story picks up the pace. Even though the overall theme is about being stuck in a time-loop, the story does not get repetitive. There is *always* something new happening with each chapter. New characters make appearances, previous oddities get explained and the world, simply put, opens up extravagantly!
Unless the very idea of fantasy/magic/time-loops puts you off, I highly recommend reading "Mother of Learning". It's *worth* it.
-chronodekar