I have a working program that has a Timer that gets its start date and time from a Date JSpinner, then fires a TimerTask to complete a task. It works perfectly well. As an experiment, I set up a second Date JSpinner with a date much later than the first to see if it would fire the same TimerTask again at the later date and time. It did not. Is a TimerTask ever reusable, or am I doing something wrong? Should the second Date JSpinner be associated with its own separate TimerTask? I could post the code, but it may be quicker to ask the question first in case I'm barking up the wrong tree.
A Timer does not have a single Date that it uses to run a task. It is essentially a queue of tasks that each have their own dates to run, and it runs each task at the date you requested.
I don't know how you called the timer with the second date, so I have no idea whether you should expect it to run the task or not. As to whether TimerTasks are reusable, that will depend on your implementation which again I don't know.
Do note that TimerTasks are cancelable though, so if you cancelled the task it won't run again. For that reason I would suggest not submitting the same task multiple times.
Also Timer is very old. In future you may want to look at ScheduledThreadPoolExecutor which does the same kind of thing.
He does not suffer fools gladly. But this tiny ad does: