how can i perform a function when a paid plan renews?

Yes, but the recurring job should be performed every day to keep up with the deadlines of all the subscriptions but I need a certain value to be entered in a database only if that subscription is renewed, any ideas? I use recurring jobs to do a check every day but then I would have to use an if () and check if after the expiration date it is still valid but I believe that the date moves every time to the next month so the condition would never be satisfied , how can I do?