The sentence in question is from the text in exercise 8, line 3-5 https://www.docdroid.net/RgiQk0x/img-20170517-0001-new.pdf.html
First, the と in bold. First I thought it is related to the quotation, but in context of the whole text this clearly has to be a conditional clause. so the と言う was omitted completely here I guess?
Second, I feel a bit uncertain about the subject of 起こしてくれる in bold. I guess it is the alarm clock? It is a transitive verb according to the dictionary, and there’s nothing that would make it intransitive here (at least not to my knowledge). And if I understand the concept of て-form + もらう、くれる etc. correctly, then it wouldn’t make sense that the narrator here „gives waking up to himself“. There’s also some uncertainty about the tense. 起こしてくれるのだが should be in the past related to 無意識に止めて、また寝てしまう But there is no verbal form indicating a past tense. On the other hand, it works just fine to say it in present tense. I just wanted to mention it because it feels a bit off to me, so maybe there’s more to this than I see right now.
So, I would translate the sentence like this: “When my clock says ‘it’s seven o clock. Good morning. Rise and shine!’, even though it wakes me up, I unconsciously turn it off and unfortunately go to sleep again.”