Automate a date field to control a boolean field from backend?

System Information
  • Strapi Version: 4.14.5
  • Operating System:
  • Database:
  • Node Version:
  • NPM Version:
  • Yarn Version:

Hello everyone, I have a question and I don’t know how to do it, I would like to control the user subscriptions, basically control if the subscriptions are active or not.

I have an ‘endsubscription’ field with a date and a boolean ‘subscription’ field

How can I automate that when the date has expired the ‘subscription’ field becomes false?

Someone could help me?

Thank you!