Add events to the Scheduler.
System.out.println("\nAdding events...\n");
// Parameters for events
Vector params = new Vector();
// Add an event for next month
params.addElement("Proofread final draft");
Calendar cal = Calendar.getInstance();
cal.add(Calendar.MONTH, 1);
params.addElement(cal.getTime());
// Add the event
if (((Boolean)client.execute("scheduler.addEvent", params))
.booleanValue()) {
System.out.println("Event added.");
} else {
System.out.println("Could not add event.");
}
// Add an event for tomorrow
params.clear();
params.addElement("Submit final draft");
cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH, 1);
params.addElement(cal.getTime());
// Add the event
if (((Boolean)client.execute("scheduler.addEvent", params))
.booleanValue()) {
System.out.println("Event added.");
} else {
System.out.println("Could not add event.");
}