To achieve this goal you have to develop a subclass of timer class that can hold a list of all scheduled Timertask instances. Then you can retrieve instance you want to cancel

Java Code:
TimerTask [] tasks =timer.getScheduledTasks();
Tasks[0].cancel();