System.out.println("***********************REPROGRAMANDO EVENTOS**********************");
System.out.println("******************************************************************");
Iterator it = entries.iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
Event event = (Event)entry.getKey();
Server server = (Server)entry.getValue();
//Server server = (Server)eventServer.get(event);
boolean ultimaTarea=false;
String eventDate = event.getDate();
String eventHour = event.getHour();
//cargar la variable date con los datos de fecha y hora del evento
int second =0;
int minute = new Integer(eventHour.substring(eventHour.indexOf(":")+1,eventHour.length())).intValue();
int hour = new Integer(eventHour.substring(0,eventHour.indexOf(":"))).intValue();
String dateParts[] = eventDate.split("-");
int year = new Integer(dateParts[0]).intValue();
int month = new Integer(dateParts[1]).intValue();
int dayOfMonth = new Integer(dateParts[2]).intValue();
Date date=getDateOf(second,minute,hour,dayOfMonth,month,year);
Date now=Calendar.getInstance().getTime();
if(event.getType().equals(Event.RESTART)){
clock.schedule(new RestartTask(clock,server,event,this),date);
}
if(event.getType().equals(Event.TEST)){
clock.schedule(new TestTask(clock,server,event,this),date);
}
}
return true;
}