How to change a user’s role conditionally to expire after two weeks

How to change a user’s role conditionally to expire after two weeks