X4 Connector Port Gateway in batch mode

How can save my sensor data in my X4 Connector Port when I suffer a GPRS disconnection an later recover the data and resend to my digi cloud accout?

This would typically be a function handled by whatever python app you run on the CP-X4 gateway for use with the sensors.

Thanks for the response, but you hace any clue, example or whatever source code, or where could search from I start to program this functionality??

I think you could find lots of examples via the links on this page:
http://knowledge.digi.com/articles/Knowledge_Base_Article/Digi-XBee-RF-Gateway-and-Python-Development-Resource-page