Past perfect continuous for habitual actions in the past
The past perfect continuous is used to express repeated or habitual actions happening over a period of time before a point in time in the past:
I had been getting up at five o'clock all week, so on Friday I was completely exhausted.