a6 gsm module trouble shooting

this code is to send message to specific number:

char phone_no[]="9488072237";

void setup() {
Serial.begin(9600);
delay(300);

Serial.println("AT+CMGF=1");
delay(2000);
Serial.print("AT+CMGS="");
Serial.print(phone_no);
Serial.write(0x22);
Serial.write(0x0D); // hex equivalent of Carraige return
Serial.write(0x0A); // hex equivalent of newline
delay(2000);
Serial.print("data!!!!");
delay(500);
Serial.println (char(26));//the ASCII code of the ctrl+z is 26

}

void loop()
{

}


this is normal program to write AT commands manually in serial monitor :

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
// set the data rate for the SoftwareSerial port
mySerial.begin(115200);

}

void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}


these 2 are working but i need as code to send a msg automatically in a daily basis...

i need a code or configuration or instruction.

Guys i need help,