Now.
If something happens and you have a medical emergency they'll need to know why you've been out.
And they'll need to plan ahead to replace your shifts when you're out for leave.
Anytime you want! I told my boss at 4 months so they would have enough time to find my replacement but it's up to you.