Email Membership members before subscription expires or after subscription fails

The subscriptions in my Membership setup are more like dues and need to be continuous. So I really need to warn folks ahead of time before their subscription expires, especially since they don't always come to the site often.

I am using the Paypal Subscription gateway. Does Paypal communicate back to Membership every month (assuming a monthly subscription) to update the expirydate on the Membership/User relationship record? If so, what happens if the site is down when Paypal calls? Most importantly, when exactly does this happen? Does it do it the day it is scheduled to expire or is there any time between when the payment fails and the subscription is up that I could go through those relationships and email out a reminder.

Thanks!