How to automatically delete users?

Hello,
Is there any way to automatically delete all users not logged in the past 90 days?
Thanks