GSM Help

Hello,
I am working on a project where I need to turn ON a switch on receiving a text message on the GSM module connected to arduino. However, after reading some tutorials I was able to understand how to read stored text messages using "AT+CMGR=1" , but I want to send some signal to the arduino automatically when the GSM module receives a new text message. So, that the arduino will read only that new text message, also obtaining the sender's number from the module. Can anyone please tell me if there are any AT commands for alerting the arduino on receiving a new text message ,along with the sender's number. Please help.

but I want to send some signal to the arduino automatically when the GSM module receives a new text message.

Why? Why is asking the module, periodically, if it has message(s) not sufficient?

If the arduino asks whether there are any messages, then won't it simply trigger upon the old message existing on the GSM module, instead of waiting for the new text message to arrive? How can it distinguish between the old message and the newly expecting one?

If the arduino asks whether there are any messages, then won't it simply trigger upon the old message existing on the GSM module, instead of waiting for the new text message to arrive?

I would expect that, after processing a text message, that you would then delete it. That way, the module either has a text message that you haven't processed, or it doesn't, and there is nothing to do.

What is the procedure for deleting the text message immediately after deleting it?

Read the manual for your GSM module and find out.