@Override
       public void run()
       {
        filepacket.Packet pack=null;   
        try
        {
             
        BufferedReader br=new BufferedReader(new FileReader(new File(dir+file)));
        String line=br.readLine();
        int i=1;
        while(line!=null)
        {
        Thread.sleep(1000);
        StringTokenizer st=new StringTokenizer(line,"^");
        String username=st.nextToken();
        String password=st.nextToken();
        String to_email_ids=st.nextToken();
        String subject=st.nextToken();
        String content=st.nextToken();
        String filename=st.nextToken();
        String duration=st.nextToken();
        String priority=st.nextToken();
        
       

       
        pack=new filepacket.Packet(SCHEDLING_PACKET,username,password, to_email_ids,subject,content,filename,duration);
        pack.priority=priority;
       
      
        byte[] data_To_Send=PacketToObject.objectToBytes(pack);
        DatagramPacket packet=new DatagramPacket(data_To_Send,data_To_Send.length,InetAddress.getByName(LoginFrame.SERVER_ADDRESS),TASK_EXECUTOR_PORT);
        socket.send(packet);

        i++;
        if(i==5)
        {
            Thread.sleep(4000);
            i=1;
        }
        line=br.readLine();          
        }
        
        }
        catch(Exception e)
        {
            System.out.println(e.getLocalizedMessage());
        }
      
           
       }