There is a service with customized devise and cancan. You need to make a premium subscription with a number of advantages for the user. How is it usually organized to check that the subscription has expired / active? The only thing that comes to mind is the option of checking all users on a schedule, which, it seems to me, is not very correct.
Update
I mean, not checking whether there is a privilege or not, but whether it is necessary to write off funds from the account and renew and cancel the subscription.