I am new to writing actions, but I was wondering if anyone could lend a hand and assist me with the following.

--
I have a date profile field that I use to outline the expiry date of a subscription I offer. I require an action (or something else - just thought and action might be easier) that sends emails to users a week before their subscription is set to expire.

Further to this, I need the action (or another one) to change the role of any of the users whose subscription does indeed expire.
--

I really have no idea how to go about this, and I would appreciate any assistance that could be offered.