Automatic Role Switching

I require to customize roles in Wordpress in such a way that when a user signs up, they pick a default role however this role will expire after a period say 7 days, month or year and when it expires, the user role will switch to another role. If I manually change the role again back to the original one, the user will run on this role again until the term expires and the user will be automatically switched to another role. Anyone to help?